diff --git a/pkg/github/app/hook_deliveries_request_builder.go b/pkg/github/app/hook_deliveries_request_builder.go index b49ef796..72915a89 100644 --- a/pkg/github/app/hook_deliveries_request_builder.go +++ b/pkg/github/app/hook_deliveries_request_builder.go @@ -17,7 +17,6 @@ type HookDeliveriesRequestBuilderGetQueryParameters struct { Cursor *string `uriparametername:"cursor"` // 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"` - Redelivery *bool `uriparametername:"redelivery"` } // ByDelivery_id gets an item from the github.com/octokit/go-sdk/pkg/github.app.hook.deliveries.item collection // returns a *HookDeliveriesWithDelivery_ItemRequestBuilder when successful @@ -32,7 +31,7 @@ func (m *HookDeliveriesRequestBuilder) ByDelivery_id(delivery_id int32)(*HookDel // NewHookDeliveriesRequestBuilderInternal instantiates a new HookDeliveriesRequestBuilder and sets the default values. func NewHookDeliveriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*HookDeliveriesRequestBuilder) { m := &HookDeliveriesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*,redelivery*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*}", pathParameters), } return m } diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index ededadf9..a30962d0 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "A5566CA38100CF0556C3E441119F1DE9F037811D04E58282358E11433C224D43EE9ECEC9379CF143288A606940AFC0E1B39F5D39FEB352BCCB4BAC92DA1D757F", + "descriptionHash": "5787123D7EABC1C5EC47FC0806C86C5EE5221E9C41D112DADCAC822558923C048C21000446CD7E4B906B04AF856432D088BA9AAE71B5D6B6B8663DC02BB7E384", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/api_insights_route_stats.go b/pkg/github/models/api_insights_route_stats.go new file mode 100644 index 00000000..823ea874 --- /dev/null +++ b/pkg/github/models/api_insights_route_stats.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ApiInsightsRouteStats 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 API path's route template + api_route *string + // The HTTP method + http_method *string + // The last_rate_limited_timestamp property + last_rate_limited_timestamp *string + // The last_request_timestamp property + last_request_timestamp *string + // The total number of requests that were rate limited within the queried time period + rate_limited_request_count *int64 + // The total number of requests within the queried time period + total_request_count *int64 +} +// NewApiInsightsRouteStats instantiates a new ApiInsightsRouteStats and sets the default values. +func NewApiInsightsRouteStats()(*ApiInsightsRouteStats) { + m := &ApiInsightsRouteStats{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiInsightsRouteStatsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiInsightsRouteStatsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiInsightsRouteStats(), 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 *ApiInsightsRouteStats) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetApiRoute gets the api_route property value. The API path's route template +// returns a *string when successful +func (m *ApiInsightsRouteStats) GetApiRoute()(*string) { + return m.api_route +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ApiInsightsRouteStats) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["api_route"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApiRoute(val) + } + return nil + } + res["http_method"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHttpMethod(val) + } + return nil + } + res["last_rate_limited_timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRateLimitedTimestamp(val) + } + return nil + } + res["last_request_timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRequestTimestamp(val) + } + return nil + } + res["rate_limited_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetRateLimitedRequestCount(val) + } + return nil + } + res["total_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalRequestCount(val) + } + return nil + } + return res +} +// GetHttpMethod gets the http_method property value. The HTTP method +// returns a *string when successful +func (m *ApiInsightsRouteStats) GetHttpMethod()(*string) { + return m.http_method +} +// GetLastRateLimitedTimestamp gets the last_rate_limited_timestamp property value. The last_rate_limited_timestamp property +// returns a *string when successful +func (m *ApiInsightsRouteStats) GetLastRateLimitedTimestamp()(*string) { + return m.last_rate_limited_timestamp +} +// GetLastRequestTimestamp gets the last_request_timestamp property value. The last_request_timestamp property +// returns a *string when successful +func (m *ApiInsightsRouteStats) GetLastRequestTimestamp()(*string) { + return m.last_request_timestamp +} +// GetRateLimitedRequestCount gets the rate_limited_request_count property value. The total number of requests that were rate limited within the queried time period +// returns a *int64 when successful +func (m *ApiInsightsRouteStats) GetRateLimitedRequestCount()(*int64) { + return m.rate_limited_request_count +} +// GetTotalRequestCount gets the total_request_count property value. The total number of requests within the queried time period +// returns a *int64 when successful +func (m *ApiInsightsRouteStats) GetTotalRequestCount()(*int64) { + return m.total_request_count +} +// Serialize serializes information the current object +func (m *ApiInsightsRouteStats) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("api_route", m.GetApiRoute()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("http_method", m.GetHttpMethod()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_rate_limited_timestamp", m.GetLastRateLimitedTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_request_timestamp", m.GetLastRequestTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("rate_limited_request_count", m.GetRateLimitedRequestCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("total_request_count", m.GetTotalRequestCount()) + 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 *ApiInsightsRouteStats) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetApiRoute sets the api_route property value. The API path's route template +func (m *ApiInsightsRouteStats) SetApiRoute(value *string)() { + m.api_route = value +} +// SetHttpMethod sets the http_method property value. The HTTP method +func (m *ApiInsightsRouteStats) SetHttpMethod(value *string)() { + m.http_method = value +} +// SetLastRateLimitedTimestamp sets the last_rate_limited_timestamp property value. The last_rate_limited_timestamp property +func (m *ApiInsightsRouteStats) SetLastRateLimitedTimestamp(value *string)() { + m.last_rate_limited_timestamp = value +} +// SetLastRequestTimestamp sets the last_request_timestamp property value. The last_request_timestamp property +func (m *ApiInsightsRouteStats) SetLastRequestTimestamp(value *string)() { + m.last_request_timestamp = value +} +// SetRateLimitedRequestCount sets the rate_limited_request_count property value. The total number of requests that were rate limited within the queried time period +func (m *ApiInsightsRouteStats) SetRateLimitedRequestCount(value *int64)() { + m.rate_limited_request_count = value +} +// SetTotalRequestCount sets the total_request_count property value. The total number of requests within the queried time period +func (m *ApiInsightsRouteStats) SetTotalRequestCount(value *int64)() { + m.total_request_count = value +} +type ApiInsightsRouteStatsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApiRoute()(*string) + GetHttpMethod()(*string) + GetLastRateLimitedTimestamp()(*string) + GetLastRequestTimestamp()(*string) + GetRateLimitedRequestCount()(*int64) + GetTotalRequestCount()(*int64) + SetApiRoute(value *string)() + SetHttpMethod(value *string)() + SetLastRateLimitedTimestamp(value *string)() + SetLastRequestTimestamp(value *string)() + SetRateLimitedRequestCount(value *int64)() + SetTotalRequestCount(value *int64)() +} diff --git a/pkg/github/models/api_insights_subject_stats.go b/pkg/github/models/api_insights_subject_stats.go new file mode 100644 index 00000000..130d86ef --- /dev/null +++ b/pkg/github/models/api_insights_subject_stats.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ApiInsightsSubjectStats 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 last_rate_limited_timestamp property + last_rate_limited_timestamp *string + // The last_request_timestamp property + last_request_timestamp *string + // The rate_limited_request_count property + rate_limited_request_count *int32 + // The subject_id property + subject_id *int64 + // The subject_name property + subject_name *string + // The subject_type property + subject_type *string + // The total_request_count property + total_request_count *int32 +} +// NewApiInsightsSubjectStats instantiates a new ApiInsightsSubjectStats and sets the default values. +func NewApiInsightsSubjectStats()(*ApiInsightsSubjectStats) { + m := &ApiInsightsSubjectStats{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiInsightsSubjectStatsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiInsightsSubjectStatsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiInsightsSubjectStats(), 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 *ApiInsightsSubjectStats) 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 *ApiInsightsSubjectStats) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["last_rate_limited_timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRateLimitedTimestamp(val) + } + return nil + } + res["last_request_timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRequestTimestamp(val) + } + return nil + } + res["rate_limited_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRateLimitedRequestCount(val) + } + return nil + } + res["subject_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSubjectId(val) + } + return nil + } + res["subject_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectName(val) + } + return nil + } + res["subject_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectType(val) + } + return nil + } + res["total_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalRequestCount(val) + } + return nil + } + return res +} +// GetLastRateLimitedTimestamp gets the last_rate_limited_timestamp property value. The last_rate_limited_timestamp property +// returns a *string when successful +func (m *ApiInsightsSubjectStats) GetLastRateLimitedTimestamp()(*string) { + return m.last_rate_limited_timestamp +} +// GetLastRequestTimestamp gets the last_request_timestamp property value. The last_request_timestamp property +// returns a *string when successful +func (m *ApiInsightsSubjectStats) GetLastRequestTimestamp()(*string) { + return m.last_request_timestamp +} +// GetRateLimitedRequestCount gets the rate_limited_request_count property value. The rate_limited_request_count property +// returns a *int32 when successful +func (m *ApiInsightsSubjectStats) GetRateLimitedRequestCount()(*int32) { + return m.rate_limited_request_count +} +// GetSubjectId gets the subject_id property value. The subject_id property +// returns a *int64 when successful +func (m *ApiInsightsSubjectStats) GetSubjectId()(*int64) { + return m.subject_id +} +// GetSubjectName gets the subject_name property value. The subject_name property +// returns a *string when successful +func (m *ApiInsightsSubjectStats) GetSubjectName()(*string) { + return m.subject_name +} +// GetSubjectType gets the subject_type property value. The subject_type property +// returns a *string when successful +func (m *ApiInsightsSubjectStats) GetSubjectType()(*string) { + return m.subject_type +} +// GetTotalRequestCount gets the total_request_count property value. The total_request_count property +// returns a *int32 when successful +func (m *ApiInsightsSubjectStats) GetTotalRequestCount()(*int32) { + return m.total_request_count +} +// Serialize serializes information the current object +func (m *ApiInsightsSubjectStats) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("last_rate_limited_timestamp", m.GetLastRateLimitedTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_request_timestamp", m.GetLastRequestTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("rate_limited_request_count", m.GetRateLimitedRequestCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("subject_id", m.GetSubjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subject_name", m.GetSubjectName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subject_type", m.GetSubjectType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_request_count", m.GetTotalRequestCount()) + 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 *ApiInsightsSubjectStats) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetLastRateLimitedTimestamp sets the last_rate_limited_timestamp property value. The last_rate_limited_timestamp property +func (m *ApiInsightsSubjectStats) SetLastRateLimitedTimestamp(value *string)() { + m.last_rate_limited_timestamp = value +} +// SetLastRequestTimestamp sets the last_request_timestamp property value. The last_request_timestamp property +func (m *ApiInsightsSubjectStats) SetLastRequestTimestamp(value *string)() { + m.last_request_timestamp = value +} +// SetRateLimitedRequestCount sets the rate_limited_request_count property value. The rate_limited_request_count property +func (m *ApiInsightsSubjectStats) SetRateLimitedRequestCount(value *int32)() { + m.rate_limited_request_count = value +} +// SetSubjectId sets the subject_id property value. The subject_id property +func (m *ApiInsightsSubjectStats) SetSubjectId(value *int64)() { + m.subject_id = value +} +// SetSubjectName sets the subject_name property value. The subject_name property +func (m *ApiInsightsSubjectStats) SetSubjectName(value *string)() { + m.subject_name = value +} +// SetSubjectType sets the subject_type property value. The subject_type property +func (m *ApiInsightsSubjectStats) SetSubjectType(value *string)() { + m.subject_type = value +} +// SetTotalRequestCount sets the total_request_count property value. The total_request_count property +func (m *ApiInsightsSubjectStats) SetTotalRequestCount(value *int32)() { + m.total_request_count = value +} +type ApiInsightsSubjectStatsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastRateLimitedTimestamp()(*string) + GetLastRequestTimestamp()(*string) + GetRateLimitedRequestCount()(*int32) + GetSubjectId()(*int64) + GetSubjectName()(*string) + GetSubjectType()(*string) + GetTotalRequestCount()(*int32) + SetLastRateLimitedTimestamp(value *string)() + SetLastRequestTimestamp(value *string)() + SetRateLimitedRequestCount(value *int32)() + SetSubjectId(value *int64)() + SetSubjectName(value *string)() + SetSubjectType(value *string)() + SetTotalRequestCount(value *int32)() +} diff --git a/pkg/github/models/api_insights_summary_stats.go b/pkg/github/models/api_insights_summary_stats.go new file mode 100644 index 00000000..32a4045c --- /dev/null +++ b/pkg/github/models/api_insights_summary_stats.go @@ -0,0 +1,110 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApiInsightsSummaryStats aPI Insights usage summary stats for an organization +type ApiInsightsSummaryStats 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 total number of requests that were rate limited within the queried time period + rate_limited_request_count *int64 + // The total number of requests within the queried time period + total_request_count *int64 +} +// NewApiInsightsSummaryStats instantiates a new ApiInsightsSummaryStats and sets the default values. +func NewApiInsightsSummaryStats()(*ApiInsightsSummaryStats) { + m := &ApiInsightsSummaryStats{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiInsightsSummaryStatsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiInsightsSummaryStatsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiInsightsSummaryStats(), 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 *ApiInsightsSummaryStats) 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 *ApiInsightsSummaryStats) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["rate_limited_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetRateLimitedRequestCount(val) + } + return nil + } + res["total_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalRequestCount(val) + } + return nil + } + return res +} +// GetRateLimitedRequestCount gets the rate_limited_request_count property value. The total number of requests that were rate limited within the queried time period +// returns a *int64 when successful +func (m *ApiInsightsSummaryStats) GetRateLimitedRequestCount()(*int64) { + return m.rate_limited_request_count +} +// GetTotalRequestCount gets the total_request_count property value. The total number of requests within the queried time period +// returns a *int64 when successful +func (m *ApiInsightsSummaryStats) GetTotalRequestCount()(*int64) { + return m.total_request_count +} +// Serialize serializes information the current object +func (m *ApiInsightsSummaryStats) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("rate_limited_request_count", m.GetRateLimitedRequestCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("total_request_count", m.GetTotalRequestCount()) + 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 *ApiInsightsSummaryStats) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRateLimitedRequestCount sets the rate_limited_request_count property value. The total number of requests that were rate limited within the queried time period +func (m *ApiInsightsSummaryStats) SetRateLimitedRequestCount(value *int64)() { + m.rate_limited_request_count = value +} +// SetTotalRequestCount sets the total_request_count property value. The total number of requests within the queried time period +func (m *ApiInsightsSummaryStats) SetTotalRequestCount(value *int64)() { + m.total_request_count = value +} +type ApiInsightsSummaryStatsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRateLimitedRequestCount()(*int64) + GetTotalRequestCount()(*int64) + SetRateLimitedRequestCount(value *int64)() + SetTotalRequestCount(value *int64)() +} diff --git a/pkg/github/models/api_insights_time_stats.go b/pkg/github/models/api_insights_time_stats.go new file mode 100644 index 00000000..2ff98a30 --- /dev/null +++ b/pkg/github/models/api_insights_time_stats.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ApiInsightsTimeStats 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 rate_limited_request_count property + rate_limited_request_count *int64 + // The timestamp property + timestamp *string + // The total_request_count property + total_request_count *int64 +} +// NewApiInsightsTimeStats instantiates a new ApiInsightsTimeStats and sets the default values. +func NewApiInsightsTimeStats()(*ApiInsightsTimeStats) { + m := &ApiInsightsTimeStats{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiInsightsTimeStatsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiInsightsTimeStatsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiInsightsTimeStats(), 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 *ApiInsightsTimeStats) 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 *ApiInsightsTimeStats) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["rate_limited_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetRateLimitedRequestCount(val) + } + return nil + } + res["timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimestamp(val) + } + return nil + } + res["total_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalRequestCount(val) + } + return nil + } + return res +} +// GetRateLimitedRequestCount gets the rate_limited_request_count property value. The rate_limited_request_count property +// returns a *int64 when successful +func (m *ApiInsightsTimeStats) GetRateLimitedRequestCount()(*int64) { + return m.rate_limited_request_count +} +// GetTimestamp gets the timestamp property value. The timestamp property +// returns a *string when successful +func (m *ApiInsightsTimeStats) GetTimestamp()(*string) { + return m.timestamp +} +// GetTotalRequestCount gets the total_request_count property value. The total_request_count property +// returns a *int64 when successful +func (m *ApiInsightsTimeStats) GetTotalRequestCount()(*int64) { + return m.total_request_count +} +// Serialize serializes information the current object +func (m *ApiInsightsTimeStats) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("rate_limited_request_count", m.GetRateLimitedRequestCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timestamp", m.GetTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("total_request_count", m.GetTotalRequestCount()) + 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 *ApiInsightsTimeStats) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRateLimitedRequestCount sets the rate_limited_request_count property value. The rate_limited_request_count property +func (m *ApiInsightsTimeStats) SetRateLimitedRequestCount(value *int64)() { + m.rate_limited_request_count = value +} +// SetTimestamp sets the timestamp property value. The timestamp property +func (m *ApiInsightsTimeStats) SetTimestamp(value *string)() { + m.timestamp = value +} +// SetTotalRequestCount sets the total_request_count property value. The total_request_count property +func (m *ApiInsightsTimeStats) SetTotalRequestCount(value *int64)() { + m.total_request_count = value +} +type ApiInsightsTimeStatsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRateLimitedRequestCount()(*int64) + GetTimestamp()(*string) + GetTotalRequestCount()(*int64) + SetRateLimitedRequestCount(value *int64)() + SetTimestamp(value *string)() + SetTotalRequestCount(value *int64)() +} diff --git a/pkg/github/models/api_insights_user_stats.go b/pkg/github/models/api_insights_user_stats.go new file mode 100644 index 00000000..ced0f926 --- /dev/null +++ b/pkg/github/models/api_insights_user_stats.go @@ -0,0 +1,312 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ApiInsightsUserStats struct { + // The actor_id property + actor_id *int64 + // The actor_name property + actor_name *string + // The actor_type property + actor_type *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The integration_id property + integration_id *int64 + // The last_rate_limited_timestamp property + last_rate_limited_timestamp *string + // The last_request_timestamp property + last_request_timestamp *string + // The oauth_application_id property + oauth_application_id *int64 + // The rate_limited_request_count property + rate_limited_request_count *int32 + // The total_request_count property + total_request_count *int32 +} +// NewApiInsightsUserStats instantiates a new ApiInsightsUserStats and sets the default values. +func NewApiInsightsUserStats()(*ApiInsightsUserStats) { + m := &ApiInsightsUserStats{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateApiInsightsUserStatsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateApiInsightsUserStatsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiInsightsUserStats(), nil +} +// GetActorId gets the actor_id property value. The actor_id property +// returns a *int64 when successful +func (m *ApiInsightsUserStats) GetActorId()(*int64) { + return m.actor_id +} +// GetActorName gets the actor_name property value. The actor_name property +// returns a *string when successful +func (m *ApiInsightsUserStats) GetActorName()(*string) { + return m.actor_name +} +// GetActorType gets the actor_type property value. The actor_type property +// returns a *string when successful +func (m *ApiInsightsUserStats) GetActorType()(*string) { + return m.actor_type +} +// 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 *ApiInsightsUserStats) 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 *ApiInsightsUserStats) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actor_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetActorId(val) + } + return nil + } + res["actor_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActorName(val) + } + return nil + } + res["actor_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActorType(val) + } + return nil + } + res["integration_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIntegrationId(val) + } + return nil + } + res["last_rate_limited_timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRateLimitedTimestamp(val) + } + return nil + } + res["last_request_timestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRequestTimestamp(val) + } + return nil + } + res["oauth_application_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOauthApplicationId(val) + } + return nil + } + res["rate_limited_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRateLimitedRequestCount(val) + } + return nil + } + res["total_request_count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalRequestCount(val) + } + return nil + } + return res +} +// GetIntegrationId gets the integration_id property value. The integration_id property +// returns a *int64 when successful +func (m *ApiInsightsUserStats) GetIntegrationId()(*int64) { + return m.integration_id +} +// GetLastRateLimitedTimestamp gets the last_rate_limited_timestamp property value. The last_rate_limited_timestamp property +// returns a *string when successful +func (m *ApiInsightsUserStats) GetLastRateLimitedTimestamp()(*string) { + return m.last_rate_limited_timestamp +} +// GetLastRequestTimestamp gets the last_request_timestamp property value. The last_request_timestamp property +// returns a *string when successful +func (m *ApiInsightsUserStats) GetLastRequestTimestamp()(*string) { + return m.last_request_timestamp +} +// GetOauthApplicationId gets the oauth_application_id property value. The oauth_application_id property +// returns a *int64 when successful +func (m *ApiInsightsUserStats) GetOauthApplicationId()(*int64) { + return m.oauth_application_id +} +// GetRateLimitedRequestCount gets the rate_limited_request_count property value. The rate_limited_request_count property +// returns a *int32 when successful +func (m *ApiInsightsUserStats) GetRateLimitedRequestCount()(*int32) { + return m.rate_limited_request_count +} +// GetTotalRequestCount gets the total_request_count property value. The total_request_count property +// returns a *int32 when successful +func (m *ApiInsightsUserStats) GetTotalRequestCount()(*int32) { + return m.total_request_count +} +// Serialize serializes information the current object +func (m *ApiInsightsUserStats) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("actor_id", m.GetActorId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("actor_name", m.GetActorName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("actor_type", m.GetActorType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("integration_id", m.GetIntegrationId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_rate_limited_timestamp", m.GetLastRateLimitedTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last_request_timestamp", m.GetLastRequestTimestamp()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("oauth_application_id", m.GetOauthApplicationId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("rate_limited_request_count", m.GetRateLimitedRequestCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total_request_count", m.GetTotalRequestCount()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActorId sets the actor_id property value. The actor_id property +func (m *ApiInsightsUserStats) SetActorId(value *int64)() { + m.actor_id = value +} +// SetActorName sets the actor_name property value. The actor_name property +func (m *ApiInsightsUserStats) SetActorName(value *string)() { + m.actor_name = value +} +// SetActorType sets the actor_type property value. The actor_type property +func (m *ApiInsightsUserStats) SetActorType(value *string)() { + m.actor_type = value +} +// 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 *ApiInsightsUserStats) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetIntegrationId sets the integration_id property value. The integration_id property +func (m *ApiInsightsUserStats) SetIntegrationId(value *int64)() { + m.integration_id = value +} +// SetLastRateLimitedTimestamp sets the last_rate_limited_timestamp property value. The last_rate_limited_timestamp property +func (m *ApiInsightsUserStats) SetLastRateLimitedTimestamp(value *string)() { + m.last_rate_limited_timestamp = value +} +// SetLastRequestTimestamp sets the last_request_timestamp property value. The last_request_timestamp property +func (m *ApiInsightsUserStats) SetLastRequestTimestamp(value *string)() { + m.last_request_timestamp = value +} +// SetOauthApplicationId sets the oauth_application_id property value. The oauth_application_id property +func (m *ApiInsightsUserStats) SetOauthApplicationId(value *int64)() { + m.oauth_application_id = value +} +// SetRateLimitedRequestCount sets the rate_limited_request_count property value. The rate_limited_request_count property +func (m *ApiInsightsUserStats) SetRateLimitedRequestCount(value *int32)() { + m.rate_limited_request_count = value +} +// SetTotalRequestCount sets the total_request_count property value. The total_request_count property +func (m *ApiInsightsUserStats) SetTotalRequestCount(value *int32)() { + m.total_request_count = value +} +type ApiInsightsUserStatsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActorId()(*int64) + GetActorName()(*string) + GetActorType()(*string) + GetIntegrationId()(*int64) + GetLastRateLimitedTimestamp()(*string) + GetLastRequestTimestamp()(*string) + GetOauthApplicationId()(*int64) + GetRateLimitedRequestCount()(*int32) + GetTotalRequestCount()(*int32) + SetActorId(value *int64)() + SetActorName(value *string)() + SetActorType(value *string)() + SetIntegrationId(value *int64)() + SetLastRateLimitedTimestamp(value *string)() + SetLastRequestTimestamp(value *string)() + SetOauthApplicationId(value *int64)() + SetRateLimitedRequestCount(value *int32)() + SetTotalRequestCount(value *int32)() +} diff --git a/pkg/github/models/check_suite.go b/pkg/github/models/check_suite.go index bd0ab8e4..05293d21 100644 --- a/pkg/github/models/check_suite.go +++ b/pkg/github/models/check_suite.go @@ -28,7 +28,7 @@ type CheckSuite struct { // The SHA of the head commit that is being checked. head_sha *string // The id property - id *int32 + id *int64 // The latest_check_runs_count property latest_check_runs_count *int32 // The node_id property @@ -190,7 +190,7 @@ func (m *CheckSuite) 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 } @@ -313,8 +313,8 @@ func (m *CheckSuite) GetHeadSha()(*string) { return m.head_sha } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *CheckSuite) GetId()(*int32) { +// returns a *int64 when successful +func (m *CheckSuite) GetId()(*int64) { return m.id } // GetLatestCheckRunsCount gets the latest_check_runs_count property value. The latest_check_runs_count property @@ -420,7 +420,7 @@ func (m *CheckSuite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -535,7 +535,7 @@ func (m *CheckSuite) SetHeadSha(value *string)() { m.head_sha = value } // SetId sets the id property value. The id property -func (m *CheckSuite) SetId(value *int32)() { +func (m *CheckSuite) SetId(value *int64)() { m.id = value } // SetLatestCheckRunsCount sets the latest_check_runs_count property value. The latest_check_runs_count property @@ -586,7 +586,7 @@ type CheckSuiteable interface { GetHeadBranch()(*string) GetHeadCommit()(SimpleCommitable) GetHeadSha()(*string) - GetId()(*int32) + GetId()(*int64) GetLatestCheckRunsCount()(*int32) GetNodeId()(*string) GetPullRequests()([]PullRequestMinimalable) @@ -605,7 +605,7 @@ type CheckSuiteable interface { SetHeadBranch(value *string)() SetHeadCommit(value SimpleCommitable)() SetHeadSha(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetLatestCheckRunsCount(value *int32)() SetNodeId(value *string)() SetPullRequests(value []PullRequestMinimalable)() diff --git a/pkg/github/models/organization_programmatic_access_grant.go b/pkg/github/models/organization_programmatic_access_grant.go index a2da9c61..cd0c9249 100644 --- a/pkg/github/models/organization_programmatic_access_grant.go +++ b/pkg/github/models/organization_programmatic_access_grant.go @@ -10,7 +10,7 @@ type OrganizationProgrammaticAccessGrant struct { access_granted_at *string // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. + // Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token. id *int32 // A GitHub user. owner SimpleUserable @@ -24,6 +24,8 @@ type OrganizationProgrammaticAccessGrant struct { token_expired *bool // Date and time when the associated fine-grained personal access token expires. token_expires_at *string + // Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. + token_id *int32 // Date and time when the associated fine-grained personal access token was last used for authentication. token_last_used_at *string } @@ -133,6 +135,16 @@ func (m *OrganizationProgrammaticAccessGrant) GetFieldDeserializers()(map[string } return nil } + res["token_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTokenId(val) + } + return nil + } res["token_last_used_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -145,7 +157,7 @@ func (m *OrganizationProgrammaticAccessGrant) GetFieldDeserializers()(map[string } return res } -// GetId gets the id property value. Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. +// GetId gets the id property value. Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token. // returns a *int32 when successful func (m *OrganizationProgrammaticAccessGrant) GetId()(*int32) { return m.id @@ -180,6 +192,11 @@ func (m *OrganizationProgrammaticAccessGrant) GetTokenExpired()(*bool) { func (m *OrganizationProgrammaticAccessGrant) GetTokenExpiresAt()(*string) { return m.token_expires_at } +// GetTokenId gets the token_id property value. Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. +// returns a *int32 when successful +func (m *OrganizationProgrammaticAccessGrant) GetTokenId()(*int32) { + return m.token_id +} // GetTokenLastUsedAt gets the token_last_used_at property value. Date and time when the associated fine-grained personal access token was last used for authentication. // returns a *string when successful func (m *OrganizationProgrammaticAccessGrant) GetTokenLastUsedAt()(*string) { @@ -236,6 +253,12 @@ func (m *OrganizationProgrammaticAccessGrant) Serialize(writer i878a80d2330e89d2 return err } } + { + err := writer.WriteInt32Value("token_id", m.GetTokenId()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("token_last_used_at", m.GetTokenLastUsedAt()) if err != nil { @@ -258,7 +281,7 @@ func (m *OrganizationProgrammaticAccessGrant) SetAccessGrantedAt(value *string)( func (m *OrganizationProgrammaticAccessGrant) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetId sets the id property value. Unique identifier of the fine-grained personal access token. The `pat_id` used to get details about an approved fine-grained personal access token. +// SetId sets the id property value. Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token. func (m *OrganizationProgrammaticAccessGrant) SetId(value *int32)() { m.id = value } @@ -286,6 +309,10 @@ func (m *OrganizationProgrammaticAccessGrant) SetTokenExpired(value *bool)() { func (m *OrganizationProgrammaticAccessGrant) SetTokenExpiresAt(value *string)() { m.token_expires_at = value } +// SetTokenId sets the token_id property value. Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. +func (m *OrganizationProgrammaticAccessGrant) SetTokenId(value *int32)() { + m.token_id = value +} // SetTokenLastUsedAt sets the token_last_used_at property value. Date and time when the associated fine-grained personal access token was last used for authentication. func (m *OrganizationProgrammaticAccessGrant) SetTokenLastUsedAt(value *string)() { m.token_last_used_at = value @@ -301,6 +328,7 @@ type OrganizationProgrammaticAccessGrantable interface { GetRepositorySelection()(*OrganizationProgrammaticAccessGrant_repository_selection) GetTokenExpired()(*bool) GetTokenExpiresAt()(*string) + GetTokenId()(*int32) GetTokenLastUsedAt()(*string) SetAccessGrantedAt(value *string)() SetId(value *int32)() @@ -310,5 +338,6 @@ type OrganizationProgrammaticAccessGrantable interface { SetRepositorySelection(value *OrganizationProgrammaticAccessGrant_repository_selection)() SetTokenExpired(value *bool)() SetTokenExpiresAt(value *string)() + SetTokenId(value *int32)() SetTokenLastUsedAt(value *string)() } diff --git a/pkg/github/models/organization_programmatic_access_grant_request.go b/pkg/github/models/organization_programmatic_access_grant_request.go index c3b0e288..787b8837 100644 --- a/pkg/github/models/organization_programmatic_access_grant_request.go +++ b/pkg/github/models/organization_programmatic_access_grant_request.go @@ -26,6 +26,8 @@ type OrganizationProgrammaticAccessGrantRequest struct { token_expired *bool // Date and time when the associated fine-grained personal access token expires. token_expires_at *string + // Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. + token_id *int32 // Date and time when the associated fine-grained personal access token was last used for authentication. token_last_used_at *string } @@ -145,6 +147,16 @@ func (m *OrganizationProgrammaticAccessGrantRequest) GetFieldDeserializers()(map } return nil } + res["token_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTokenId(val) + } + return nil + } res["token_last_used_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -197,6 +209,11 @@ func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenExpired()(*bool) { func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenExpiresAt()(*string) { return m.token_expires_at } +// GetTokenId gets the token_id property value. Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. +// returns a *int32 when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenId()(*int32) { + return m.token_id +} // GetTokenLastUsedAt gets the token_last_used_at property value. Date and time when the associated fine-grained personal access token was last used for authentication. // returns a *string when successful func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenLastUsedAt()(*string) { @@ -259,6 +276,12 @@ func (m *OrganizationProgrammaticAccessGrantRequest) Serialize(writer i878a80d23 return err } } + { + err := writer.WriteInt32Value("token_id", m.GetTokenId()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("token_last_used_at", m.GetTokenLastUsedAt()) if err != nil { @@ -313,6 +336,10 @@ func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenExpired(value *bool func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenExpiresAt(value *string)() { m.token_expires_at = value } +// SetTokenId sets the token_id property value. Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. +func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenId(value *int32)() { + m.token_id = value +} // SetTokenLastUsedAt sets the token_last_used_at property value. Date and time when the associated fine-grained personal access token was last used for authentication. func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenLastUsedAt(value *string)() { m.token_last_used_at = value @@ -329,6 +356,7 @@ type OrganizationProgrammaticAccessGrantRequestable interface { GetRepositorySelection()(*OrganizationProgrammaticAccessGrantRequest_repository_selection) GetTokenExpired()(*bool) GetTokenExpiresAt()(*string) + GetTokenId()(*int32) GetTokenLastUsedAt()(*string) SetCreatedAt(value *string)() SetId(value *int32)() @@ -339,5 +367,6 @@ type OrganizationProgrammaticAccessGrantRequestable interface { SetRepositorySelection(value *OrganizationProgrammaticAccessGrantRequest_repository_selection)() SetTokenExpired(value *bool)() SetTokenExpiresAt(value *string)() + SetTokenId(value *int32)() SetTokenLastUsedAt(value *string)() } diff --git a/pkg/github/orgs/item/insights/api/routestats/item/item/get_direction_query_parameter_type.go b/pkg/github/orgs/item/insights/api/routestats/item/item/get_direction_query_parameter_type.go new file mode 100644 index 00000000..3e88c253 --- /dev/null +++ b/pkg/github/orgs/item/insights/api/routestats/item/item/get_direction_query_parameter_type.go @@ -0,0 +1,33 @@ +package item +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/insights/api/routestats/item/item/get_sort_query_parameter_type.go b/pkg/github/orgs/item/insights/api/routestats/item/item/get_sort_query_parameter_type.go new file mode 100644 index 00000000..2becf094 --- /dev/null +++ b/pkg/github/orgs/item/insights/api/routestats/item/item/get_sort_query_parameter_type.go @@ -0,0 +1,45 @@ +package item +type GetSortQueryParameterType int + +const ( + LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + LAST_REQUEST_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + RATE_LIMITED_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + HTTP_METHOD_GETSORTQUERYPARAMETERTYPE + API_ROUTE_GETSORTQUERYPARAMETERTYPE + TOTAL_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"last_rate_limited_timestamp", "last_request_timestamp", "rate_limited_request_count", "http_method", "api_route", "total_request_count"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + switch v { + case "last_rate_limited_timestamp": + result = LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + case "last_request_timestamp": + result = LAST_REQUEST_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + case "rate_limited_request_count": + result = RATE_LIMITED_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + case "http_method": + result = HTTP_METHOD_GETSORTQUERYPARAMETERTYPE + case "api_route": + result = API_ROUTE_GETSORTQUERYPARAMETERTYPE + case "total_request_count": + result = TOTAL_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/insights/api/subjectstats/get_direction_query_parameter_type.go b/pkg/github/orgs/item/insights/api/subjectstats/get_direction_query_parameter_type.go new file mode 100644 index 00000000..f16264ed --- /dev/null +++ b/pkg/github/orgs/item/insights/api/subjectstats/get_direction_query_parameter_type.go @@ -0,0 +1,33 @@ +package subjectstats +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/insights/api/subjectstats/get_sort_query_parameter_type.go b/pkg/github/orgs/item/insights/api/subjectstats/get_sort_query_parameter_type.go new file mode 100644 index 00000000..2da152ea --- /dev/null +++ b/pkg/github/orgs/item/insights/api/subjectstats/get_sort_query_parameter_type.go @@ -0,0 +1,42 @@ +package subjectstats +type GetSortQueryParameterType int + +const ( + LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + LAST_REQUEST_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + RATE_LIMITED_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + SUBJECT_NAME_GETSORTQUERYPARAMETERTYPE + TOTAL_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"last_rate_limited_timestamp", "last_request_timestamp", "rate_limited_request_count", "subject_name", "total_request_count"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + switch v { + case "last_rate_limited_timestamp": + result = LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + case "last_request_timestamp": + result = LAST_REQUEST_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + case "rate_limited_request_count": + result = RATE_LIMITED_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + case "subject_name": + result = SUBJECT_NAME_GETSORTQUERYPARAMETERTYPE + case "total_request_count": + result = TOTAL_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/insights/api/userstats/item/get_direction_query_parameter_type.go b/pkg/github/orgs/item/insights/api/userstats/item/get_direction_query_parameter_type.go new file mode 100644 index 00000000..3e88c253 --- /dev/null +++ b/pkg/github/orgs/item/insights/api/userstats/item/get_direction_query_parameter_type.go @@ -0,0 +1,33 @@ +package item +type GetDirectionQueryParameterType int + +const ( + ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota + DESC_GETDIRECTIONQUERYPARAMETERTYPE +) + +func (i GetDirectionQueryParameterType) String() string { + return []string{"asc", "desc"}[i] +} +func ParseGetDirectionQueryParameterType(v string) (any, error) { + result := ASC_GETDIRECTIONQUERYPARAMETERTYPE + switch v { + case "asc": + result = ASC_GETDIRECTIONQUERYPARAMETERTYPE + case "desc": + result = DESC_GETDIRECTIONQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetDirectionQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item/insights/api/userstats/item/get_sort_query_parameter_type.go b/pkg/github/orgs/item/insights/api/userstats/item/get_sort_query_parameter_type.go new file mode 100644 index 00000000..20915415 --- /dev/null +++ b/pkg/github/orgs/item/insights/api/userstats/item/get_sort_query_parameter_type.go @@ -0,0 +1,42 @@ +package item +type GetSortQueryParameterType int + +const ( + LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota + LAST_REQUEST_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + RATE_LIMITED_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + SUBJECT_NAME_GETSORTQUERYPARAMETERTYPE + TOTAL_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE +) + +func (i GetSortQueryParameterType) String() string { + return []string{"last_rate_limited_timestamp", "last_request_timestamp", "rate_limited_request_count", "subject_name", "total_request_count"}[i] +} +func ParseGetSortQueryParameterType(v string) (any, error) { + result := LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + switch v { + case "last_rate_limited_timestamp": + result = LAST_RATE_LIMITED_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + case "last_request_timestamp": + result = LAST_REQUEST_TIMESTAMP_GETSORTQUERYPARAMETERTYPE + case "rate_limited_request_count": + result = RATE_LIMITED_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + case "subject_name": + result = SUBJECT_NAME_GETSORTQUERYPARAMETERTYPE + case "total_request_count": + result = TOTAL_REQUEST_COUNT_GETSORTQUERYPARAMETERTYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i GetSortQueryParameterType) isMultiValue() bool { + return false +} diff --git a/pkg/github/orgs/item_hooks_item_deliveries_request_builder.go b/pkg/github/orgs/item_hooks_item_deliveries_request_builder.go index c4a92a64..ef28df50 100644 --- a/pkg/github/orgs/item_hooks_item_deliveries_request_builder.go +++ b/pkg/github/orgs/item_hooks_item_deliveries_request_builder.go @@ -17,7 +17,6 @@ type ItemHooksItemDeliveriesRequestBuilderGetQueryParameters struct { Cursor *string `uriparametername:"cursor"` // 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"` - Redelivery *bool `uriparametername:"redelivery"` } // ByDelivery_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.hooks.item.deliveries.item collection // returns a *ItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder when successful @@ -32,7 +31,7 @@ func (m *ItemHooksItemDeliveriesRequestBuilder) ByDelivery_id(delivery_id int32) // NewItemHooksItemDeliveriesRequestBuilderInternal instantiates a new ItemHooksItemDeliveriesRequestBuilder and sets the default values. func NewItemHooksItemDeliveriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemHooksItemDeliveriesRequestBuilder) { m := &ItemHooksItemDeliveriesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries{?cursor*,per_page*,redelivery*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries{?cursor*,per_page*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_request_builder.go b/pkg/github/orgs/item_insights_api_request_builder.go new file mode 100644 index 00000000..5cd80850 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_request_builder.go @@ -0,0 +1,48 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsApiRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api +type ItemInsightsApiRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemInsightsApiRequestBuilderInternal instantiates a new ItemInsightsApiRequestBuilder and sets the default values. +func NewItemInsightsApiRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRequestBuilder) { + m := &ItemInsightsApiRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api", pathParameters), + } + return m +} +// NewItemInsightsApiRequestBuilder instantiates a new ItemInsightsApiRequestBuilder and sets the default values. +func NewItemInsightsApiRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiRequestBuilderInternal(urlParams, requestAdapter) +} +// RouteStats the routeStats property +// returns a *ItemInsightsApiRouteStatsRequestBuilder when successful +func (m *ItemInsightsApiRequestBuilder) RouteStats()(*ItemInsightsApiRouteStatsRequestBuilder) { + return NewItemInsightsApiRouteStatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SubjectStats the subjectStats property +// returns a *ItemInsightsApiSubjectStatsRequestBuilder when successful +func (m *ItemInsightsApiRequestBuilder) SubjectStats()(*ItemInsightsApiSubjectStatsRequestBuilder) { + return NewItemInsightsApiSubjectStatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// SummaryStats the summaryStats property +// returns a *ItemInsightsApiSummaryStatsRequestBuilder when successful +func (m *ItemInsightsApiRequestBuilder) SummaryStats()(*ItemInsightsApiSummaryStatsRequestBuilder) { + return NewItemInsightsApiSummaryStatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// TimeStats the timeStats property +// returns a *ItemInsightsApiTimeStatsRequestBuilder when successful +func (m *ItemInsightsApiRequestBuilder) TimeStats()(*ItemInsightsApiTimeStatsRequestBuilder) { + return NewItemInsightsApiTimeStatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// UserStats the userStats property +// returns a *ItemInsightsApiUserStatsRequestBuilder when successful +func (m *ItemInsightsApiRequestBuilder) UserStats()(*ItemInsightsApiUserStatsRequestBuilder) { + return NewItemInsightsApiUserStatsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go new file mode 100644 index 00000000..2858f356 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go @@ -0,0 +1,76 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" + i668a5d59a0d5a0e25bc1604cf7a50b2d949f1e3f49a4c9ec4b197e7a9b3d7b0a "github.com/octokit/go-sdk/pkg/github/orgs/item/insights/api/routestats/item/item" +) + +// ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\route-stats\{actor_type}\{actor_id} +type ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters get API request count statistics for an actor broken down by route within a specified time frame. +type ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i668a5d59a0d5a0e25bc1604cf7a50b2d949f1e3f49a4c9ec4b197e7a9b3d7b0a.GetDirectionQueryParameterType `uriparametername:"direction"` + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // 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"` + // The property to sort the results by. + Sort []i668a5d59a0d5a0e25bc1604cf7a50b2d949f1e3f49a4c9ec4b197e7a9b3d7b0a.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderInternal instantiates a new ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) { + m := &ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder instantiates a new ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get API request count statistics for an actor broken down by route within a specified time frame. +// returns a []ApiInsightsRouteStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-route-stats-by-actor +func (m *ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsRouteStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsRouteStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsRouteStatsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsRouteStatsable) + } + } + return val, nil +} +// ToGetRequestInformation get API request count statistics for an actor broken down by route within a specified time frame. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters])(*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 *ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder when successful +func (m *ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) { + return NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_api_route_stats_request_builder.go b/pkg/github/orgs/item_insights_api_route_stats_request_builder.go new file mode 100644 index 00000000..11f5d602 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_route_stats_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsApiRouteStatsRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\route-stats +type ItemInsightsApiRouteStatsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByActor_type gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.routeStats.item collection +// returns a *ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder when successful +func (m *ItemInsightsApiRouteStatsRequestBuilder) ByActor_type(actor_type string)(*ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if actor_type != "" { + urlTplParams["actor_type"] = actor_type + } + return NewItemInsightsApiRouteStatsWithActor_typeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiRouteStatsRequestBuilderInternal instantiates a new ItemInsightsApiRouteStatsRequestBuilder and sets the default values. +func NewItemInsightsApiRouteStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRouteStatsRequestBuilder) { + m := &ItemInsightsApiRouteStatsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats", pathParameters), + } + return m +} +// NewItemInsightsApiRouteStatsRequestBuilder instantiates a new ItemInsightsApiRouteStatsRequestBuilder and sets the default values. +func NewItemInsightsApiRouteStatsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRouteStatsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiRouteStatsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_insights_api_route_stats_with_actor_escaped_type_item_request_builder.go b/pkg/github/orgs/item_insights_api_route_stats_with_actor_escaped_type_item_request_builder.go new file mode 100644 index 00000000..63241d95 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_route_stats_with_actor_escaped_type_item_request_builder.go @@ -0,0 +1,34 @@ +package orgs + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\route-stats\{actor_type} +type ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByActor_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.routeStats.item.item collection +// returns a *ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder when successful +func (m *ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder) ByActor_id(actor_id int32)(*ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["actor_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(actor_id), 10) + return NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiRouteStatsWithActor_typeItemRequestBuilderInternal instantiates a new ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder and sets the default values. +func NewItemInsightsApiRouteStatsWithActor_typeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder) { + m := &ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}", pathParameters), + } + return m +} +// NewItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder instantiates a new ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder and sets the default values. +func NewItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRouteStatsWithActor_typeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiRouteStatsWithActor_typeItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go b/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go new file mode 100644 index 00000000..40a917ea --- /dev/null +++ b/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go @@ -0,0 +1,76 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" + i66b1523c4c4ef510ea098d616fe90f80d2679e0386fabfe6a2f1742954997624 "github.com/octokit/go-sdk/pkg/github/orgs/item/insights/api/subjectstats" +) + +// ItemInsightsApiSubjectStatsRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\subject-stats +type ItemInsightsApiSubjectStatsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiSubjectStatsRequestBuilderGetQueryParameters get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. +type ItemInsightsApiSubjectStatsRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i66b1523c4c4ef510ea098d616fe90f80d2679e0386fabfe6a2f1742954997624.GetDirectionQueryParameterType `uriparametername:"direction"` + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // 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"` + // The property to sort the results by. + Sort []i66b1523c4c4ef510ea098d616fe90f80d2679e0386fabfe6a2f1742954997624.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewItemInsightsApiSubjectStatsRequestBuilderInternal instantiates a new ItemInsightsApiSubjectStatsRequestBuilder and sets the default values. +func NewItemInsightsApiSubjectStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSubjectStatsRequestBuilder) { + m := &ItemInsightsApiSubjectStatsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewItemInsightsApiSubjectStatsRequestBuilder instantiates a new ItemInsightsApiSubjectStatsRequestBuilder and sets the default values. +func NewItemInsightsApiSubjectStatsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSubjectStatsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiSubjectStatsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. +// returns a []ApiInsightsSubjectStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-subject-stats +func (m *ItemInsightsApiSubjectStatsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiSubjectStatsRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSubjectStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsSubjectStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSubjectStatsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSubjectStatsable) + } + } + return val, nil +} +// ToGetRequestInformation get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiSubjectStatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiSubjectStatsRequestBuilderGetQueryParameters])(*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 *ItemInsightsApiSubjectStatsRequestBuilder when successful +func (m *ItemInsightsApiSubjectStatsRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiSubjectStatsRequestBuilder) { + return NewItemInsightsApiSubjectStatsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_api_summary_stats_item_with_actor_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_summary_stats_item_with_actor_escaped_item_request_builder.go new file mode 100644 index 00000000..c2fbf967 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_summary_stats_item_with_actor_escaped_item_request_builder.go @@ -0,0 +1,64 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats\{actor_type}\{actor_id} +type ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderGetQueryParameters get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. +type ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderGetQueryParameters struct { + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` +} +// NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderInternal instantiates a new ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder) { + m := &ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters), + } + return m +} +// NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder instantiates a new ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. +// returns a ApiInsightsSummaryStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-summary-stats-by-actor +func (m *ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderGetQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSummaryStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsSummaryStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSummaryStatsable), nil +} +// ToGetRequestInformation get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderGetQueryParameters])(*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 *ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder when successful +func (m *ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder) { + return NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_api_summary_stats_request_builder.go b/pkg/github/orgs/item_insights_api_summary_stats_request_builder.go new file mode 100644 index 00000000..4d0af031 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_summary_stats_request_builder.go @@ -0,0 +1,81 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemInsightsApiSummaryStatsRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats +type ItemInsightsApiSummaryStatsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiSummaryStatsRequestBuilderGetQueryParameters get overall statistics of API requests made within an organization by all users and apps within a specified time frame. +type ItemInsightsApiSummaryStatsRequestBuilderGetQueryParameters struct { + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` +} +// ByActor_type gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.summaryStats.item collection +// returns a *ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder when successful +func (m *ItemInsightsApiSummaryStatsRequestBuilder) ByActor_type(actor_type string)(*ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if actor_type != "" { + urlTplParams["actor_type"] = actor_type + } + return NewItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiSummaryStatsRequestBuilderInternal instantiates a new ItemInsightsApiSummaryStatsRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsRequestBuilder) { + m := &ItemInsightsApiSummaryStatsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters), + } + return m +} +// NewItemInsightsApiSummaryStatsRequestBuilder instantiates a new ItemInsightsApiSummaryStatsRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiSummaryStatsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get overall statistics of API requests made within an organization by all users and apps within a specified time frame. +// returns a ApiInsightsSummaryStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-summary-stats +func (m *ItemInsightsApiSummaryStatsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiSummaryStatsRequestBuilderGetQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSummaryStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsSummaryStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSummaryStatsable), nil +} +// ToGetRequestInformation get overall statistics of API requests made within an organization by all users and apps within a specified time frame. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiSummaryStatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiSummaryStatsRequestBuilderGetQueryParameters])(*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 +} +// Users the users property +// returns a *ItemInsightsApiSummaryStatsUsersRequestBuilder when successful +func (m *ItemInsightsApiSummaryStatsRequestBuilder) Users()(*ItemInsightsApiSummaryStatsUsersRequestBuilder) { + return NewItemInsightsApiSummaryStatsUsersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInsightsApiSummaryStatsRequestBuilder when successful +func (m *ItemInsightsApiSummaryStatsRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiSummaryStatsRequestBuilder) { + return NewItemInsightsApiSummaryStatsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_api_summary_stats_users_request_builder.go b/pkg/github/orgs/item_insights_api_summary_stats_users_request_builder.go new file mode 100644 index 00000000..934f40d8 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_summary_stats_users_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsApiSummaryStatsUsersRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats\users +type ItemInsightsApiSummaryStatsUsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByUser_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.summaryStats.users.item collection +// returns a *ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder when successful +func (m *ItemInsightsApiSummaryStatsUsersRequestBuilder) ByUser_id(user_id string)(*ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if user_id != "" { + urlTplParams["user_id"] = user_id + } + return NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiSummaryStatsUsersRequestBuilderInternal instantiates a new ItemInsightsApiSummaryStatsUsersRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsUsersRequestBuilder) { + m := &ItemInsightsApiSummaryStatsUsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users", pathParameters), + } + return m +} +// NewItemInsightsApiSummaryStatsUsersRequestBuilder instantiates a new ItemInsightsApiSummaryStatsUsersRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsUsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiSummaryStatsUsersRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_insights_api_summary_stats_users_with_user_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_summary_stats_users_with_user_escaped_item_request_builder.go new file mode 100644 index 00000000..38636532 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_summary_stats_users_with_user_escaped_item_request_builder.go @@ -0,0 +1,64 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats\users\{user_id} +type ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderGetQueryParameters get overall statistics of API requests within the organization for a user. +type ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderGetQueryParameters struct { + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` +} +// NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderInternal instantiates a new ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder) { + m := &ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters), + } + return m +} +// NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder instantiates a new ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get overall statistics of API requests within the organization for a user. +// returns a ApiInsightsSummaryStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-summary-stats-by-user +func (m *ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderGetQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSummaryStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsSummaryStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsSummaryStatsable), nil +} +// ToGetRequestInformation get overall statistics of API requests within the organization for a user. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderGetQueryParameters])(*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 *ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder when successful +func (m *ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder) { + return NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_api_summary_stats_with_actor_escaped_type_item_request_builder.go b/pkg/github/orgs/item_insights_api_summary_stats_with_actor_escaped_type_item_request_builder.go new file mode 100644 index 00000000..3cf80440 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_summary_stats_with_actor_escaped_type_item_request_builder.go @@ -0,0 +1,34 @@ +package orgs + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats\{actor_type} +type ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByActor_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.summaryStats.item.item collection +// returns a *ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder when successful +func (m *ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder) ByActor_id(actor_id int32)(*ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["actor_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(actor_id), 10) + return NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilderInternal instantiates a new ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder) { + m := &ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}", pathParameters), + } + return m +} +// NewItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder instantiates a new ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder and sets the default values. +func NewItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiSummaryStatsWithActor_typeItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_insights_api_time_stats_item_with_actor_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_time_stats_item_with_actor_escaped_item_request_builder.go new file mode 100644 index 00000000..160523c3 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_time_stats_item_with_actor_escaped_item_request_builder.go @@ -0,0 +1,69 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\time-stats\{actor_type}\{actor_id} +type ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderGetQueryParameters get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. +type ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderGetQueryParameters struct { + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` + // The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + Timestamp_increment *string `uriparametername:"timestamp_increment"` +} +// NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderInternal instantiates a new ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder) { + m := &ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters), + } + return m +} +// NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder instantiates a new ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. +// returns a []ApiInsightsTimeStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-time-stats-by-actor +func (m *ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsTimeStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable) + } + } + return val, nil +} +// ToGetRequestInformation get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderGetQueryParameters])(*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 *ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder when successful +func (m *ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder) { + return NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_api_time_stats_request_builder.go b/pkg/github/orgs/item_insights_api_time_stats_request_builder.go new file mode 100644 index 00000000..abe64bce --- /dev/null +++ b/pkg/github/orgs/item_insights_api_time_stats_request_builder.go @@ -0,0 +1,86 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemInsightsApiTimeStatsRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\time-stats +type ItemInsightsApiTimeStatsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiTimeStatsRequestBuilderGetQueryParameters get the number of API requests and rate-limited requests made within an organization over a specified time period. +type ItemInsightsApiTimeStatsRequestBuilderGetQueryParameters struct { + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` + // The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + Timestamp_increment *string `uriparametername:"timestamp_increment"` +} +// ByActor_type gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.timeStats.item collection +// returns a *ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder when successful +func (m *ItemInsightsApiTimeStatsRequestBuilder) ByActor_type(actor_type string)(*ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if actor_type != "" { + urlTplParams["actor_type"] = actor_type + } + return NewItemInsightsApiTimeStatsWithActor_typeItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiTimeStatsRequestBuilderInternal instantiates a new ItemInsightsApiTimeStatsRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsRequestBuilder) { + m := &ItemInsightsApiTimeStatsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters), + } + return m +} +// NewItemInsightsApiTimeStatsRequestBuilder instantiates a new ItemInsightsApiTimeStatsRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiTimeStatsRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of API requests and rate-limited requests made within an organization over a specified time period. +// returns a []ApiInsightsTimeStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-time-stats +func (m *ItemInsightsApiTimeStatsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiTimeStatsRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsTimeStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable) + } + } + return val, nil +} +// ToGetRequestInformation get the number of API requests and rate-limited requests made within an organization over a specified time period. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiTimeStatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiTimeStatsRequestBuilderGetQueryParameters])(*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 +} +// Users the users property +// returns a *ItemInsightsApiTimeStatsUsersRequestBuilder when successful +func (m *ItemInsightsApiTimeStatsRequestBuilder) Users()(*ItemInsightsApiTimeStatsUsersRequestBuilder) { + return NewItemInsightsApiTimeStatsUsersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemInsightsApiTimeStatsRequestBuilder when successful +func (m *ItemInsightsApiTimeStatsRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiTimeStatsRequestBuilder) { + return NewItemInsightsApiTimeStatsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_api_time_stats_users_request_builder.go b/pkg/github/orgs/item_insights_api_time_stats_users_request_builder.go new file mode 100644 index 00000000..01c50ab6 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_time_stats_users_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsApiTimeStatsUsersRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\time-stats\users +type ItemInsightsApiTimeStatsUsersRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByUser_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.timeStats.users.item collection +// returns a *ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder when successful +func (m *ItemInsightsApiTimeStatsUsersRequestBuilder) ByUser_id(user_id string)(*ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if user_id != "" { + urlTplParams["user_id"] = user_id + } + return NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiTimeStatsUsersRequestBuilderInternal instantiates a new ItemInsightsApiTimeStatsUsersRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsUsersRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsUsersRequestBuilder) { + m := &ItemInsightsApiTimeStatsUsersRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users", pathParameters), + } + return m +} +// NewItemInsightsApiTimeStatsUsersRequestBuilder instantiates a new ItemInsightsApiTimeStatsUsersRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsUsersRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsUsersRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiTimeStatsUsersRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_insights_api_time_stats_users_with_user_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_time_stats_users_with_user_escaped_item_request_builder.go new file mode 100644 index 00000000..7a67c3ee --- /dev/null +++ b/pkg/github/orgs/item_insights_api_time_stats_users_with_user_escaped_item_request_builder.go @@ -0,0 +1,69 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\time-stats\users\{user_id} +type ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderGetQueryParameters get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. +type ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderGetQueryParameters struct { + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` + // The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) + Timestamp_increment *string `uriparametername:"timestamp_increment"` +} +// NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderInternal instantiates a new ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder) { + m := &ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters), + } + return m +} +// NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder instantiates a new ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. +// returns a []ApiInsightsTimeStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-time-stats-by-user +func (m *ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsTimeStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsTimeStatsable) + } + } + return val, nil +} +// ToGetRequestInformation get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderGetQueryParameters])(*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 *ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder when successful +func (m *ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder) { + return NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_api_time_stats_with_actor_escaped_type_item_request_builder.go b/pkg/github/orgs/item_insights_api_time_stats_with_actor_escaped_type_item_request_builder.go new file mode 100644 index 00000000..fa9800ce --- /dev/null +++ b/pkg/github/orgs/item_insights_api_time_stats_with_actor_escaped_type_item_request_builder.go @@ -0,0 +1,34 @@ +package orgs + +import ( + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\time-stats\{actor_type} +type ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByActor_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.timeStats.item.item collection +// returns a *ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder when successful +func (m *ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder) ByActor_id(actor_id int32)(*ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["actor_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(actor_id), 10) + return NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiTimeStatsWithActor_typeItemRequestBuilderInternal instantiates a new ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsWithActor_typeItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder) { + m := &ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}", pathParameters), + } + return m +} +// NewItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder instantiates a new ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder and sets the default values. +func NewItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsWithActor_typeItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiTimeStatsWithActor_typeItemRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_insights_api_user_stats_request_builder.go b/pkg/github/orgs/item_insights_api_user_stats_request_builder.go new file mode 100644 index 00000000..c56e5e30 --- /dev/null +++ b/pkg/github/orgs/item_insights_api_user_stats_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsApiUserStatsRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\user-stats +type ItemInsightsApiUserStatsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ByUser_id gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.userStats.item collection +// returns a *ItemInsightsApiUserStatsWithUser_ItemRequestBuilder when successful +func (m *ItemInsightsApiUserStatsRequestBuilder) ByUser_id(user_id string)(*ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if user_id != "" { + urlTplParams["user_id"] = user_id + } + return NewItemInsightsApiUserStatsWithUser_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsApiUserStatsRequestBuilderInternal instantiates a new ItemInsightsApiUserStatsRequestBuilder and sets the default values. +func NewItemInsightsApiUserStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiUserStatsRequestBuilder) { + m := &ItemInsightsApiUserStatsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats", pathParameters), + } + return m +} +// NewItemInsightsApiUserStatsRequestBuilder instantiates a new ItemInsightsApiUserStatsRequestBuilder and sets the default values. +func NewItemInsightsApiUserStatsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiUserStatsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiUserStatsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go new file mode 100644 index 00000000..b23e9a7d --- /dev/null +++ b/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go @@ -0,0 +1,76 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" + i7d233d983aef6d2ef322e211e3103c6ba3de064a22b55751ba43d02c6e28fa48 "github.com/octokit/go-sdk/pkg/github/orgs/item/insights/api/userstats/item" +) + +// ItemInsightsApiUserStatsWithUser_ItemRequestBuilder builds and executes requests for operations under \orgs\{org}\insights\api\user-stats\{user_id} +type ItemInsightsApiUserStatsWithUser_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters get API usage statistics within an organization for a user broken down by the type of access. +type ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters struct { + // The direction to sort the results by. + Direction *i7d233d983aef6d2ef322e211e3103c6ba3de064a22b55751ba43d02c6e28fa48.GetDirectionQueryParameterType `uriparametername:"direction"` + // The maximum timestamp to query for stats + Max_timestamp *string `uriparametername:"max_timestamp"` + // The minimum timestamp to query for stats + Min_timestamp *string `uriparametername:"min_timestamp"` + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // 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"` + // The property to sort the results by. + Sort []i7d233d983aef6d2ef322e211e3103c6ba3de064a22b55751ba43d02c6e28fa48.GetSortQueryParameterType `uriparametername:"sort"` +} +// NewItemInsightsApiUserStatsWithUser_ItemRequestBuilderInternal instantiates a new ItemInsightsApiUserStatsWithUser_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiUserStatsWithUser_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) { + m := &ItemInsightsApiUserStatsWithUser_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters), + } + return m +} +// NewItemInsightsApiUserStatsWithUser_ItemRequestBuilder instantiates a new ItemInsightsApiUserStatsWithUser_ItemRequestBuilder and sets the default values. +func NewItemInsightsApiUserStatsWithUser_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsApiUserStatsWithUser_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get get API usage statistics within an organization for a user broken down by the type of access. +// returns a []ApiInsightsUserStatsable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/api-insights#get-user-stats +func (m *ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsUserStatsable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateApiInsightsUserStatsFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsUserStatsable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.ApiInsightsUserStatsable) + } + } + return val, nil +} +// ToGetRequestInformation get API usage statistics within an organization for a user broken down by the type of access. +// returns a *RequestInformation when successful +func (m *ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters])(*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 *ItemInsightsApiUserStatsWithUser_ItemRequestBuilder when successful +func (m *ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) WithUrl(rawUrl string)(*ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) { + return NewItemInsightsApiUserStatsWithUser_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/item_insights_request_builder.go b/pkg/github/orgs/item_insights_request_builder.go new file mode 100644 index 00000000..ec006d74 --- /dev/null +++ b/pkg/github/orgs/item_insights_request_builder.go @@ -0,0 +1,28 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemInsightsRequestBuilder builds and executes requests for operations under \orgs\{org}\insights +type ItemInsightsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Api the api property +// returns a *ItemInsightsApiRequestBuilder when successful +func (m *ItemInsightsRequestBuilder) Api()(*ItemInsightsApiRequestBuilder) { + return NewItemInsightsApiRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemInsightsRequestBuilderInternal instantiates a new ItemInsightsRequestBuilder and sets the default values. +func NewItemInsightsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsRequestBuilder) { + m := &ItemInsightsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights", pathParameters), + } + return m +} +// NewItemInsightsRequestBuilder instantiates a new ItemInsightsRequestBuilder and sets the default values. +func NewItemInsightsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemInsightsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_packages_item_item_restore_request_builder.go b/pkg/github/orgs/item_packages_item_item_restore_request_builder.go index 256f98fe..0e0bd45a 100644 --- a/pkg/github/orgs/item_packages_item_item_restore_request_builder.go +++ b/pkg/github/orgs/item_packages_item_item_restore_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemPackagesItemItemRestoreRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." type ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters struct { // package token Token *string `uriparametername:"token"` @@ -28,7 +28,7 @@ func NewItemPackagesItemItemRestoreRequestBuilder(rawUrl string, requestAdapter urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemItemRestoreRequestBuilderInternal(urlParams, requestAdapter) } -// Post restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Post restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -51,7 +51,7 @@ func (m *ItemPackagesItemItemRestoreRequestBuilder) Post(ctx context.Context, re } return nil } -// ToPostRequestInformation restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToPostRequestInformation restores an entire package in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_packages_item_item_versions_item_restore_request_builder.go b/pkg/github/orgs/item_packages_item_item_versions_item_restore_request_builder.go index c1ad7697..d7a85947 100644 --- a/pkg/github/orgs/item_packages_item_item_versions_item_restore_request_builder.go +++ b/pkg/github/orgs/item_packages_item_item_versions_item_restore_request_builder.go @@ -23,7 +23,7 @@ func NewItemPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl string, req urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(urlParams, requestAdapter) } -// Post restores a specific package version in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Post restores a specific package version in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) Post(ctx context } return nil } -// ToPostRequestInformation restores a specific package version in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToPostRequestInformation restores a specific package version in an organization.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_packages_item_item_versions_request_builder.go b/pkg/github/orgs/item_packages_item_item_versions_request_builder.go index 2078e44e..223bdae6 100644 --- a/pkg/github/orgs/item_packages_item_item_versions_request_builder.go +++ b/pkg/github/orgs/item_packages_item_item_versions_request_builder.go @@ -12,7 +12,7 @@ import ( type ItemPackagesItemItemVersionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemPackagesItemItemVersionsRequestBuilderGetQueryParameters lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ItemPackagesItemItemVersionsRequestBuilderGetQueryParameters lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." type ItemPackagesItemItemVersionsRequestBuilderGetQueryParameters 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"` @@ -44,7 +44,7 @@ func NewItemPackagesItemItemVersionsRequestBuilder(rawUrl string, requestAdapter urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemItemVersionsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a []PackageVersionable 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 @@ -74,7 +74,7 @@ func (m *ItemPackagesItemItemVersionsRequestBuilder) Get(ctx context.Context, re } return val, nil } -// ToGetRequestInformation lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemVersionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go b/pkg/github/orgs/item_packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go index 8de2325f..61813f2d 100644 --- a/pkg/github/orgs/item_packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUr urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Delete deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Del } return nil } -// Get gets a specific package version in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get gets a specific package version in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a PackageVersionable when successful // [API method documentation] // @@ -70,7 +70,7 @@ func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Get func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Restore()(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { return NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToDeleteRequestInformation deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -78,7 +78,7 @@ func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToD requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets a specific package version in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation gets a specific package version in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_packages_item_with_package_escaped_name_item_request_builder.go b/pkg/github/orgs/item_packages_item_with_package_escaped_name_item_request_builder.go index e2a3ad97..368d7bba 100644 --- a/pkg/github/orgs/item_packages_item_with_package_escaped_name_item_request_builder.go +++ b/pkg/github/orgs/item_packages_item_with_package_escaped_name_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemPackagesItemWithPackage_nameItemRequestBuilder(rawUrl string, reques urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Delete deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Delete(ctx context. } return nil } -// Get gets a specific package in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get gets a specific package in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a PackageEscapedable when successful // [API method documentation] // @@ -70,7 +70,7 @@ func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Get(ctx context.Con func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Restore()(*ItemPackagesItemItemRestoreRequestBuilder) { return NewItemPackagesItemItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToDeleteRequestInformation deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -78,7 +78,7 @@ func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInfo requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets a specific package in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation gets a specific package in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_packages_request_builder.go b/pkg/github/orgs/item_packages_request_builder.go index 1c073f79..d0b67847 100644 --- a/pkg/github/orgs/item_packages_request_builder.go +++ b/pkg/github/orgs/item_packages_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemPackagesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemPackagesRequestBuilderGetQueryParameters lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ItemPackagesRequestBuilderGetQueryParameters lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." type ItemPackagesRequestBuilderGetQueryParameters struct { // The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. Package_type *i54a313bac026cb0feec5bbef0f57abc11427cc4e5752056265b05087fd0d9089.GetPackage_typeQueryParameterType `uriparametername:"package_type"` @@ -47,7 +47,7 @@ func NewItemPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 urlParams["request-raw-url"] = rawUrl return NewItemPackagesRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a []PackageEscapedable 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 @@ -75,7 +75,7 @@ func (m *ItemPackagesRequestBuilder) Get(ctx context.Context, requestConfigurati } return val, nil } -// ToGetRequestInformation lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation lists packages in an organization readable by the user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/with_org_item_request_builder.go b/pkg/github/orgs/with_org_item_request_builder.go index fa168a5f..9cabc085 100644 --- a/pkg/github/orgs/with_org_item_request_builder.go +++ b/pkg/github/orgs/with_org_item_request_builder.go @@ -143,6 +143,11 @@ func (m *WithOrgItemRequestBuilder) Get(ctx context.Context, requestConfiguratio func (m *WithOrgItemRequestBuilder) Hooks()(*ItemHooksRequestBuilder) { return NewItemHooksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Insights the insights property +// returns a *ItemInsightsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Insights()(*ItemInsightsRequestBuilder) { + return NewItemInsightsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Installation the installation property // returns a *ItemInstallationRequestBuilder when successful func (m *WithOrgItemRequestBuilder) Installation()(*ItemInstallationRequestBuilder) { diff --git a/pkg/github/repos/item_item_hooks_item_deliveries_request_builder.go b/pkg/github/repos/item_item_hooks_item_deliveries_request_builder.go index fda7a252..46d0e9c9 100644 --- a/pkg/github/repos/item_item_hooks_item_deliveries_request_builder.go +++ b/pkg/github/repos/item_item_hooks_item_deliveries_request_builder.go @@ -17,7 +17,6 @@ type ItemItemHooksItemDeliveriesRequestBuilderGetQueryParameters struct { Cursor *string `uriparametername:"cursor"` // 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"` - Redelivery *bool `uriparametername:"redelivery"` } // ByDelivery_id gets an item from the github.com/octokit/go-sdk/pkg/github.repos.item.item.hooks.item.deliveries.item collection // returns a *ItemItemHooksItemDeliveriesWithDelivery_ItemRequestBuilder when successful @@ -32,7 +31,7 @@ func (m *ItemItemHooksItemDeliveriesRequestBuilder) ByDelivery_id(delivery_id in // NewItemItemHooksItemDeliveriesRequestBuilderInternal instantiates a new ItemItemHooksItemDeliveriesRequestBuilder and sets the default values. func NewItemItemHooksItemDeliveriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemHooksItemDeliveriesRequestBuilder) { m := &ItemItemHooksItemDeliveriesRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries{?cursor*,per_page*,redelivery*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries{?cursor*,per_page*}", pathParameters), } return m } diff --git a/pkg/github/user/packages_item_item_restore_request_builder.go b/pkg/github/user/packages_item_item_restore_request_builder.go index de96d45f..366e0505 100644 --- a/pkg/github/user/packages_item_item_restore_request_builder.go +++ b/pkg/github/user/packages_item_item_restore_request_builder.go @@ -10,7 +10,7 @@ import ( type PackagesItemItemRestoreRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// PackagesItemItemRestoreRequestBuilderPostQueryParameters restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// PackagesItemItemRestoreRequestBuilderPostQueryParameters restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." type PackagesItemItemRestoreRequestBuilderPostQueryParameters struct { // package token Token *string `uriparametername:"token"` @@ -28,7 +28,7 @@ func NewPackagesItemItemRestoreRequestBuilder(rawUrl string, requestAdapter i2ae urlParams["request-raw-url"] = rawUrl return NewPackagesItemItemRestoreRequestBuilderInternal(urlParams, requestAdapter) } -// Post restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Post restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -51,7 +51,7 @@ func (m *PackagesItemItemRestoreRequestBuilder) Post(ctx context.Context, reques } return nil } -// ToPostRequestInformation restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToPostRequestInformation restores a package owned by the authenticated user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *PackagesItemItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesItemItemRestoreRequestBuilderPostQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/user/packages_item_item_versions_item_restore_request_builder.go b/pkg/github/user/packages_item_item_versions_item_restore_request_builder.go index 240f18b4..22f5580d 100644 --- a/pkg/github/user/packages_item_item_versions_item_restore_request_builder.go +++ b/pkg/github/user/packages_item_item_versions_item_restore_request_builder.go @@ -23,7 +23,7 @@ func NewPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl string, request urlParams["request-raw-url"] = rawUrl return NewPackagesItemItemVersionsItemRestoreRequestBuilderInternal(urlParams, requestAdapter) } -// Post restores a package version owned by the authenticated user.You can restore a deleted package version under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Post restores a package version owned by the authenticated user.You can restore a deleted package version under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *PackagesItemItemVersionsItemRestoreRequestBuilder) Post(ctx context.Con } return nil } -// ToPostRequestInformation restores a package version owned by the authenticated user.You can restore a deleted package version under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToPostRequestInformation restores a package version owned by the authenticated user.You can restore a deleted package version under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *PackagesItemItemVersionsItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/user/packages_item_item_versions_request_builder.go b/pkg/github/user/packages_item_item_versions_request_builder.go index 12cd42b2..4b3892fe 100644 --- a/pkg/github/user/packages_item_item_versions_request_builder.go +++ b/pkg/github/user/packages_item_item_versions_request_builder.go @@ -12,7 +12,7 @@ import ( type PackagesItemItemVersionsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// PackagesItemItemVersionsRequestBuilderGetQueryParameters lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// PackagesItemItemVersionsRequestBuilderGetQueryParameters lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." type PackagesItemItemVersionsRequestBuilderGetQueryParameters 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"` @@ -44,7 +44,7 @@ func NewPackagesItemItemVersionsRequestBuilder(rawUrl string, requestAdapter i2a urlParams["request-raw-url"] = rawUrl return NewPackagesItemItemVersionsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a []PackageVersionable 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 @@ -74,7 +74,7 @@ func (m *PackagesItemItemVersionsRequestBuilder) Get(ctx context.Context, reques } return val, nil } -// ToGetRequestInformation lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation lists package versions for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *PackagesItemItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesItemItemVersionsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/user/packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go b/pkg/github/user/packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go index 36eb53d0..174b2610 100644 --- a/pkg/github/user/packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go +++ b/pkg/github/user/packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go @@ -23,7 +23,7 @@ func NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUrl st urlParams["request-raw-url"] = rawUrl return NewPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Delete deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Delete( } return nil } -// Get gets a specific package version for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get gets a specific package version for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a PackageVersionable when successful // [API method documentation] // @@ -70,7 +70,7 @@ func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Get(ctx func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Restore()(*PackagesItemItemVersionsItemRestoreRequestBuilder) { return NewPackagesItemItemVersionsItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToDeleteRequestInformation deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.The authenticated user must have admin permissions in the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -78,7 +78,7 @@ func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToDelet requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets a specific package version for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation gets a specific package version for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *PackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/user/packages_item_with_package_escaped_name_item_request_builder.go b/pkg/github/user/packages_item_with_package_escaped_name_item_request_builder.go index fdc77530..32b889ac 100644 --- a/pkg/github/user/packages_item_with_package_escaped_name_item_request_builder.go +++ b/pkg/github/user/packages_item_with_package_escaped_name_item_request_builder.go @@ -23,7 +23,7 @@ func NewPackagesItemWithPackage_nameItemRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewPackagesItemWithPackage_nameItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Delete deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *PackagesItemWithPackage_nameItemRequestBuilder) Delete(ctx context.Cont } return nil } -// Get gets a specific package for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get gets a specific package for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a PackageEscapedable when successful // [API method documentation] // @@ -70,7 +70,7 @@ func (m *PackagesItemWithPackage_nameItemRequestBuilder) Get(ctx context.Context func (m *PackagesItemWithPackage_nameItemRequestBuilder) Restore()(*PackagesItemItemRestoreRequestBuilder) { return NewPackagesItemItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToDeleteRequestInformation deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *PackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -78,7 +78,7 @@ func (m *PackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInformat requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets a specific package for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation gets a specific package for a package owned by the authenticated user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *PackagesItemWithPackage_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/user/packages_request_builder.go b/pkg/github/user/packages_request_builder.go index 17c6c864..39130792 100644 --- a/pkg/github/user/packages_request_builder.go +++ b/pkg/github/user/packages_request_builder.go @@ -11,7 +11,7 @@ import ( type PackagesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// PackagesRequestBuilderGetQueryParameters lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// PackagesRequestBuilderGetQueryParameters lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." type PackagesRequestBuilderGetQueryParameters struct { // The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. Package_type *ia90ad7174ccc536446ffbf323e44f93ad4e7b5bc6ecfa01a7999e03949929e86.GetPackage_typeQueryParameterType `uriparametername:"package_type"` @@ -47,7 +47,7 @@ func NewPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26337 urlParams["request-raw-url"] = rawUrl return NewPackagesRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a []PackageEscapedable when successful // [API method documentation] // @@ -69,7 +69,7 @@ func (m *PackagesRequestBuilder) Get(ctx context.Context, requestConfiguration * } return val, nil } -// ToGetRequestInformation lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation lists packages owned by the authenticated user within the user's namespace.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *PackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[PackagesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/users/item_packages_item_item_restore_request_builder.go b/pkg/github/users/item_packages_item_item_restore_request_builder.go index ae9c126b..8dcb51b5 100644 --- a/pkg/github/users/item_packages_item_item_restore_request_builder.go +++ b/pkg/github/users/item_packages_item_item_restore_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemPackagesItemItemRestoreRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." type ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters struct { // package token Token *string `uriparametername:"token"` @@ -28,7 +28,7 @@ func NewItemPackagesItemItemRestoreRequestBuilder(rawUrl string, requestAdapter urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemItemRestoreRequestBuilderInternal(urlParams, requestAdapter) } -// Post restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Post restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -51,7 +51,7 @@ func (m *ItemPackagesItemItemRestoreRequestBuilder) Post(ctx context.Context, re } return nil } -// ToPostRequestInformation restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToPostRequestInformation restores an entire package for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesItemItemRestoreRequestBuilderPostQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/users/item_packages_item_item_versions_item_restore_request_builder.go b/pkg/github/users/item_packages_item_item_versions_item_restore_request_builder.go index 3347c638..c0a58eec 100644 --- a/pkg/github/users/item_packages_item_item_versions_item_restore_request_builder.go +++ b/pkg/github/users/item_packages_item_item_versions_item_restore_request_builder.go @@ -23,7 +23,7 @@ func NewItemPackagesItemItemVersionsItemRestoreRequestBuilder(rawUrl string, req urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(urlParams, requestAdapter) } -// Post restores a specific package version for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Post restores a specific package version for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) Post(ctx context } return nil } -// ToPostRequestInformation restores a specific package version for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToPostRequestInformation restores a specific package version for a user.You can restore a deleted package under the following conditions: - The package was deleted within the last 30 days. - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemVersionsItemRestoreRequestBuilder) ToPostRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/users/item_packages_item_item_versions_request_builder.go b/pkg/github/users/item_packages_item_item_versions_request_builder.go index ee4f5cd1..a9742372 100644 --- a/pkg/github/users/item_packages_item_item_versions_request_builder.go +++ b/pkg/github/users/item_packages_item_item_versions_request_builder.go @@ -34,7 +34,7 @@ func NewItemPackagesItemItemVersionsRequestBuilder(rawUrl string, requestAdapter urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemItemVersionsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists package versions for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get lists package versions for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a []PackageVersionable 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 @@ -64,7 +64,7 @@ func (m *ItemPackagesItemItemVersionsRequestBuilder) Get(ctx context.Context, re } return val, nil } -// ToGetRequestInformation lists package versions for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation lists package versions for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemVersionsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/users/item_packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go b/pkg/github/users/item_packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go index 1751aa97..360e249d 100644 --- a/pkg/github/users/item_packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go +++ b/pkg/github/users/item_packages_item_item_versions_with_package_escaped_version_escaped_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder(rawUr urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Delete deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Del } return nil } -// Get gets a specific package version for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get gets a specific package version for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a PackageVersionable when successful // [API method documentation] // @@ -70,7 +70,7 @@ func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Get func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) Restore()(*ItemPackagesItemItemVersionsItemRestoreRequestBuilder) { return NewItemPackagesItemItemVersionsItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToDeleteRequestInformation deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -78,7 +78,7 @@ func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToD requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets a specific package version for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation gets a specific package version for a public package owned by a specified user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemItemVersionsWithPackage_version_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/users/item_packages_item_with_package_escaped_name_item_request_builder.go b/pkg/github/users/item_packages_item_with_package_escaped_name_item_request_builder.go index 8c64ef58..2f66e0de 100644 --- a/pkg/github/users/item_packages_item_with_package_escaped_name_item_request_builder.go +++ b/pkg/github/users/item_packages_item_with_package_escaped_name_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemPackagesItemWithPackage_nameItemRequestBuilder(rawUrl string, reques urlParams["request-raw-url"] = rawUrl return NewItemPackagesItemWithPackage_nameItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Delete deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -46,7 +46,7 @@ func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Delete(ctx context. } return nil } -// Get gets a specific package metadata for a public package owned by a user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get gets a specific package metadata for a public package owned by a user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a PackageEscapedable when successful // [API method documentation] // @@ -70,7 +70,7 @@ func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Get(ctx context.Con func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) Restore()(*ItemPackagesItemItemRestoreRequestBuilder) { return NewItemPackagesItemItemRestoreRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToDeleteRequestInformation deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -78,7 +78,7 @@ func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToDeleteRequestInfo requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToGetRequestInformation gets a specific package metadata for a public package owned by a user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation gets a specific package metadata for a public package owned by a user.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesItemWithPackage_nameItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/users/item_packages_request_builder.go b/pkg/github/users/item_packages_request_builder.go index de2b399f..638b6259 100644 --- a/pkg/github/users/item_packages_request_builder.go +++ b/pkg/github/users/item_packages_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemPackagesRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemPackagesRequestBuilderGetQueryParameters lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ItemPackagesRequestBuilderGetQueryParameters lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." type ItemPackagesRequestBuilderGetQueryParameters struct { // The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. Package_type *i0db6aa605b66c3e026e578c21909de97874d74c479b878696174db88d81a5b36.GetPackage_typeQueryParameterType `uriparametername:"package_type"` @@ -47,7 +47,7 @@ func NewItemPackagesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2 urlParams["request-raw-url"] = rawUrl return NewItemPackagesRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// Get lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a []PackageEscapedable 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 @@ -75,7 +75,7 @@ func (m *ItemPackagesRequestBuilder) Get(ctx context.Context, requestConfigurati } return val, nil } -// ToGetRequestInformation lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +// ToGetRequestInformation lists all packages in a user's namespace for which the requesting user has access.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." // returns a *RequestInformation when successful func (m *ItemPackagesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemPackagesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)