From 6a57fa876234cef4606bcd32a823607555a84d80 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 1 Apr 2026 14:15:02 +0000 Subject: [PATCH] Generate serviceaccount --- .../serviceaccount/model_service_account.go | 56 ++++++++++++++++++- services/serviceaccount/oas_commit | 2 +- .../v2api/model_service_account.go | 34 ++++++++++- 3 files changed, 88 insertions(+), 4 deletions(-) diff --git a/services/serviceaccount/model_service_account.go b/services/serviceaccount/model_service_account.go index ff4e9ff8a..34407e24e 100644 --- a/services/serviceaccount/model_service_account.go +++ b/services/serviceaccount/model_service_account.go @@ -126,6 +126,33 @@ type ServiceAccountGetProjectIdArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccountGetProjectIdRetType = string +/* + types and functions for tokenEndpoint +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServiceAccountGetTokenEndpointAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getServiceAccountGetTokenEndpointAttributeTypeOk(arg ServiceAccountGetTokenEndpointAttributeType) (ret ServiceAccountGetTokenEndpointRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setServiceAccountGetTokenEndpointAttributeType(arg *ServiceAccountGetTokenEndpointAttributeType, val ServiceAccountGetTokenEndpointRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServiceAccountGetTokenEndpointArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ServiceAccountGetTokenEndpointRetType = string + // ServiceAccount struct for ServiceAccount // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ServiceAccount struct { @@ -141,6 +168,9 @@ type ServiceAccount struct { // ID of the related project // REQUIRED ProjectId ServiceAccountGetProjectIdAttributeType `json:"projectId" required:"true"` + // Endpoint used to obtain access tokens for the service account + // REQUIRED + TokenEndpoint ServiceAccountGetTokenEndpointAttributeType `json:"tokenEndpoint" required:"true"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -151,12 +181,13 @@ type _ServiceAccount ServiceAccount // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewServiceAccount(email ServiceAccountGetEmailArgType, id ServiceAccountGetIdArgType, internal ServiceAccountgetInternalArgType, projectId ServiceAccountGetProjectIdArgType) *ServiceAccount { +func NewServiceAccount(email ServiceAccountGetEmailArgType, id ServiceAccountGetIdArgType, internal ServiceAccountgetInternalArgType, projectId ServiceAccountGetProjectIdArgType, tokenEndpoint ServiceAccountGetTokenEndpointArgType) *ServiceAccount { this := ServiceAccount{} setServiceAccountGetEmailAttributeType(&this.Email, email) setServiceAccountGetIdAttributeType(&this.Id, id) setServiceAccountgetInternalAttributeType(&this.Internal, internal) setServiceAccountGetProjectIdAttributeType(&this.ProjectId, projectId) + setServiceAccountGetTokenEndpointAttributeType(&this.TokenEndpoint, tokenEndpoint) return &this } @@ -249,6 +280,26 @@ func (o *ServiceAccount) SetProjectId(v ServiceAccountGetProjectIdRetType) { setServiceAccountGetProjectIdAttributeType(&o.ProjectId, v) } +// GetTokenEndpoint returns the TokenEndpoint field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ServiceAccount) GetTokenEndpoint() (ret ServiceAccountGetTokenEndpointRetType) { + ret, _ = o.GetTokenEndpointOk() + return ret +} + +// GetTokenEndpointOk returns a tuple with the TokenEndpoint field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ServiceAccount) GetTokenEndpointOk() (ret ServiceAccountGetTokenEndpointRetType, ok bool) { + return getServiceAccountGetTokenEndpointAttributeTypeOk(o.TokenEndpoint) +} + +// SetTokenEndpoint sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ServiceAccount) SetTokenEndpoint(v ServiceAccountGetTokenEndpointRetType) { + setServiceAccountGetTokenEndpointAttributeType(&o.TokenEndpoint, v) +} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ServiceAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} @@ -264,6 +315,9 @@ func (o ServiceAccount) ToMap() (map[string]interface{}, error) { if val, ok := getServiceAccountGetProjectIdAttributeTypeOk(o.ProjectId); ok { toSerialize["ProjectId"] = val } + if val, ok := getServiceAccountGetTokenEndpointAttributeTypeOk(o.TokenEndpoint); ok { + toSerialize["TokenEndpoint"] = val + } return toSerialize, nil } diff --git a/services/serviceaccount/oas_commit b/services/serviceaccount/oas_commit index 3423bbfe6..32bbf4fbf 100644 --- a/services/serviceaccount/oas_commit +++ b/services/serviceaccount/oas_commit @@ -1 +1 @@ -f15f0e449d347f36dde5feac11c328b72d7f10dc +7df21609559f3652a7fee05149a6c1b729428532 diff --git a/services/serviceaccount/v2api/model_service_account.go b/services/serviceaccount/v2api/model_service_account.go index a406c152c..57fd18e58 100644 --- a/services/serviceaccount/v2api/model_service_account.go +++ b/services/serviceaccount/v2api/model_service_account.go @@ -27,7 +27,9 @@ type ServiceAccount struct { // Flag indicating internal service accounts Internal bool `json:"internal"` // ID of the related project - ProjectId string `json:"projectId"` + ProjectId string `json:"projectId"` + // Endpoint used to obtain access tokens for the service account + TokenEndpoint string `json:"tokenEndpoint"` AdditionalProperties map[string]interface{} } @@ -37,12 +39,13 @@ type _ServiceAccount ServiceAccount // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewServiceAccount(email string, id string, internal bool, projectId string) *ServiceAccount { +func NewServiceAccount(email string, id string, internal bool, projectId string, tokenEndpoint string) *ServiceAccount { this := ServiceAccount{} this.Email = email this.Id = id this.Internal = internal this.ProjectId = projectId + this.TokenEndpoint = tokenEndpoint return &this } @@ -150,6 +153,30 @@ func (o *ServiceAccount) SetProjectId(v string) { o.ProjectId = v } +// GetTokenEndpoint returns the TokenEndpoint field value +func (o *ServiceAccount) GetTokenEndpoint() string { + if o == nil { + var ret string + return ret + } + + return o.TokenEndpoint +} + +// GetTokenEndpointOk returns a tuple with the TokenEndpoint field value +// and a boolean to check if the value has been set. +func (o *ServiceAccount) GetTokenEndpointOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenEndpoint, true +} + +// SetTokenEndpoint sets field value +func (o *ServiceAccount) SetTokenEndpoint(v string) { + o.TokenEndpoint = v +} + func (o ServiceAccount) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -164,6 +191,7 @@ func (o ServiceAccount) ToMap() (map[string]interface{}, error) { toSerialize["id"] = o.Id toSerialize["internal"] = o.Internal toSerialize["projectId"] = o.ProjectId + toSerialize["tokenEndpoint"] = o.TokenEndpoint for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -181,6 +209,7 @@ func (o *ServiceAccount) UnmarshalJSON(data []byte) (err error) { "id", "internal", "projectId", + "tokenEndpoint", } allProperties := make(map[string]interface{}) @@ -214,6 +243,7 @@ func (o *ServiceAccount) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "id") delete(additionalProperties, "internal") delete(additionalProperties, "projectId") + delete(additionalProperties, "tokenEndpoint") o.AdditionalProperties = additionalProperties }