Skip to content

Commit

Permalink
New updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot committed Nov 6, 2024
1 parent 0033c74 commit 6652d60
Show file tree
Hide file tree
Showing 6 changed files with 2,260 additions and 2,220 deletions.
4,153 changes: 1,975 additions & 2,178 deletions pkg/github/.kiota.log

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "1D5E960546592D9E0322BEA12F02FCB606F07A50F432AA56007500DA3F414CA71CBDD38F3BFF6C34305D3A94183E5BDE0EF1653D0118441AB793954081571FBE",
"descriptionHash": "ACF7F8E1397A3F9B10C546825BB913A899DCED11A9A46654EBBFD63A843C451F1E52D1BBB0DBD96EE7E9BDB08BE78124E5AC89CACCED5E016DB1925D50A8D4AD",
"descriptionLocation": "../../../../../schemas/ghes-3.13.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.19.0",
Expand Down
29 changes: 29 additions & 0 deletions pkg/github/models/organization_programmatic_access_grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ type OrganizationProgrammaticAccessGrant struct {
token_id *int32
// Date and time when the associated fine-grained personal access token was last used for authentication.
token_last_used_at *string
// The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.
token_name *string
}
// NewOrganizationProgrammaticAccessGrant instantiates a new OrganizationProgrammaticAccessGrant and sets the default values.
func NewOrganizationProgrammaticAccessGrant()(*OrganizationProgrammaticAccessGrant) {
Expand Down Expand Up @@ -155,6 +157,16 @@ func (m *OrganizationProgrammaticAccessGrant) GetFieldDeserializers()(map[string
}
return nil
}
res["token_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTokenName(val)
}
return nil
}
return res
}
// GetId gets the id property value. Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token.
Expand Down Expand Up @@ -202,6 +214,11 @@ func (m *OrganizationProgrammaticAccessGrant) GetTokenId()(*int32) {
func (m *OrganizationProgrammaticAccessGrant) GetTokenLastUsedAt()(*string) {
return m.token_last_used_at
}
// GetTokenName gets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.
// returns a *string when successful
func (m *OrganizationProgrammaticAccessGrant) GetTokenName()(*string) {
return m.token_name
}
// Serialize serializes information the current object
func (m *OrganizationProgrammaticAccessGrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
Expand Down Expand Up @@ -265,6 +282,12 @@ func (m *OrganizationProgrammaticAccessGrant) Serialize(writer i878a80d2330e89d2
return err
}
}
{
err := writer.WriteStringValue("token_name", m.GetTokenName())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
Expand Down Expand Up @@ -317,6 +340,10 @@ func (m *OrganizationProgrammaticAccessGrant) SetTokenId(value *int32)() {
func (m *OrganizationProgrammaticAccessGrant) SetTokenLastUsedAt(value *string)() {
m.token_last_used_at = value
}
// SetTokenName sets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.
func (m *OrganizationProgrammaticAccessGrant) SetTokenName(value *string)() {
m.token_name = value
}
type OrganizationProgrammaticAccessGrantable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
Expand All @@ -330,6 +357,7 @@ type OrganizationProgrammaticAccessGrantable interface {
GetTokenExpiresAt()(*string)
GetTokenId()(*int32)
GetTokenLastUsedAt()(*string)
GetTokenName()(*string)
SetAccessGrantedAt(value *string)()
SetId(value *int32)()
SetOwner(value SimpleUserable)()
Expand All @@ -340,4 +368,5 @@ type OrganizationProgrammaticAccessGrantable interface {
SetTokenExpiresAt(value *string)()
SetTokenId(value *int32)()
SetTokenLastUsedAt(value *string)()
SetTokenName(value *string)()
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type OrganizationProgrammaticAccessGrantRequest struct {
token_id *int32
// Date and time when the associated fine-grained personal access token was last used for authentication.
token_last_used_at *string
// The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.
token_name *string
}
// NewOrganizationProgrammaticAccessGrantRequest instantiates a new OrganizationProgrammaticAccessGrantRequest and sets the default values.
func NewOrganizationProgrammaticAccessGrantRequest()(*OrganizationProgrammaticAccessGrantRequest) {
Expand Down Expand Up @@ -167,6 +169,16 @@ func (m *OrganizationProgrammaticAccessGrantRequest) GetFieldDeserializers()(map
}
return nil
}
res["token_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTokenName(val)
}
return nil
}
return res
}
// GetId gets the id property value. Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests.
Expand Down Expand Up @@ -219,6 +231,11 @@ func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenId()(*int32) {
func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenLastUsedAt()(*string) {
return m.token_last_used_at
}
// GetTokenName gets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.
// returns a *string when successful
func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenName()(*string) {
return m.token_name
}
// Serialize serializes information the current object
func (m *OrganizationProgrammaticAccessGrantRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
Expand Down Expand Up @@ -288,6 +305,12 @@ func (m *OrganizationProgrammaticAccessGrantRequest) Serialize(writer i878a80d23
return err
}
}
{
err := writer.WriteStringValue("token_name", m.GetTokenName())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
Expand Down Expand Up @@ -344,6 +367,10 @@ func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenId(value *int32)()
func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenLastUsedAt(value *string)() {
m.token_last_used_at = value
}
// SetTokenName sets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.
func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenName(value *string)() {
m.token_name = value
}
type OrganizationProgrammaticAccessGrantRequestable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
Expand All @@ -358,6 +385,7 @@ type OrganizationProgrammaticAccessGrantRequestable interface {
GetTokenExpiresAt()(*string)
GetTokenId()(*int32)
GetTokenLastUsedAt()(*string)
GetTokenName()(*string)
SetCreatedAt(value *string)()
SetId(value *int32)()
SetOwner(value SimpleUserable)()
Expand All @@ -369,4 +397,5 @@ type OrganizationProgrammaticAccessGrantRequestable interface {
SetTokenExpiresAt(value *string)()
SetTokenId(value *int32)()
SetTokenLastUsedAt(value *string)()
SetTokenName(value *string)()
}
152 changes: 111 additions & 41 deletions pkg/github/models/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ import (
type Users struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
// Whether this email address is the primary address.
primary *bool
// The type of email address.
typeEscaped *string
// The email address.
value *string
// The fragment property
fragment *string
// The matches property
matches []Users_matchesable
// The object_type property
object_type *string
// The object_url property
object_url *string
// The property property
property *string
}
// NewUsers instantiates a new Users and sets the default values.
func NewUsers()(*Users) {
Expand All @@ -35,69 +39,123 @@ func (m *Users) GetAdditionalData()(map[string]any) {
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *Users) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["primary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
res["fragment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetFragment(val)
}
return nil
}
res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateUsers_matchesFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]Users_matchesable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(Users_matchesable)
}
}
m.SetMatches(res)
}
return nil
}
res["object_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetPrimary(val)
m.SetObjectType(val)
}
return nil
}
res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res["object_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTypeEscaped(val)
m.SetObjectUrl(val)
}
return nil
}
res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetValue(val)
m.SetProperty(val)
}
return nil
}
return res
}
// GetPrimary gets the primary property value. Whether this email address is the primary address.
// returns a *bool when successful
func (m *Users) GetPrimary()(*bool) {
return m.primary
// GetFragment gets the fragment property value. The fragment property
// returns a *string when successful
func (m *Users) GetFragment()(*string) {
return m.fragment
}
// GetMatches gets the matches property value. The matches property
// returns a []Users_matchesable when successful
func (m *Users) GetMatches()([]Users_matchesable) {
return m.matches
}
// GetObjectType gets the object_type property value. The object_type property
// returns a *string when successful
func (m *Users) GetObjectType()(*string) {
return m.object_type
}
// GetTypeEscaped gets the type property value. The type of email address.
// GetObjectUrl gets the object_url property value. The object_url property
// returns a *string when successful
func (m *Users) GetTypeEscaped()(*string) {
return m.typeEscaped
func (m *Users) GetObjectUrl()(*string) {
return m.object_url
}
// GetValue gets the value property value. The email address.
// GetProperty gets the property property value. The property property
// returns a *string when successful
func (m *Users) GetValue()(*string) {
return m.value
func (m *Users) GetProperty()(*string) {
return m.property
}
// Serialize serializes information the current object
func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteBoolValue("primary", m.GetPrimary())
err := writer.WriteStringValue("fragment", m.GetFragment())
if err != nil {
return err
}
}
if m.GetMatches() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches()))
for i, v := range m.GetMatches() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err := writer.WriteCollectionOfObjectValues("matches", cast)
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("object_type", m.GetObjectType())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("type", m.GetTypeEscaped())
err := writer.WriteStringValue("object_url", m.GetObjectUrl())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("value", m.GetValue())
err := writer.WriteStringValue("property", m.GetProperty())
if err != nil {
return err
}
Expand All @@ -114,25 +172,37 @@ func (m *Users) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4
func (m *Users) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetPrimary sets the primary property value. Whether this email address is the primary address.
func (m *Users) SetPrimary(value *bool)() {
m.primary = value
// SetFragment sets the fragment property value. The fragment property
func (m *Users) SetFragment(value *string)() {
m.fragment = value
}
// SetMatches sets the matches property value. The matches property
func (m *Users) SetMatches(value []Users_matchesable)() {
m.matches = value
}
// SetObjectType sets the object_type property value. The object_type property
func (m *Users) SetObjectType(value *string)() {
m.object_type = value
}
// SetTypeEscaped sets the type property value. The type of email address.
func (m *Users) SetTypeEscaped(value *string)() {
m.typeEscaped = value
// SetObjectUrl sets the object_url property value. The object_url property
func (m *Users) SetObjectUrl(value *string)() {
m.object_url = value
}
// SetValue sets the value property value. The email address.
func (m *Users) SetValue(value *string)() {
m.value = value
// SetProperty sets the property property value. The property property
func (m *Users) SetProperty(value *string)() {
m.property = value
}
type Usersable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetPrimary()(*bool)
GetTypeEscaped()(*string)
GetValue()(*string)
SetPrimary(value *bool)()
SetTypeEscaped(value *string)()
SetValue(value *string)()
GetFragment()(*string)
GetMatches()([]Users_matchesable)
GetObjectType()(*string)
GetObjectUrl()(*string)
GetProperty()(*string)
SetFragment(value *string)()
SetMatches(value []Users_matchesable)()
SetObjectType(value *string)()
SetObjectUrl(value *string)()
SetProperty(value *string)()
}
Loading

0 comments on commit 6652d60

Please sign in to comment.