From c140e26514cd1bb1837edf8de987dda29d739e98 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 3 Oct 2024 00:09:16 +0000 Subject: [PATCH 1/2] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- ...m_issues_with_issue_escaped_number_item_request_builder.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index f96df248..77e2b65e 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "66C48296D32F2DF7B89235D036841D14E635F5F8D2617BD66FD09D9814A17B81ADD1E1B95EA6C8A8521D0C42FBB5B557F8B1A0A7413EB39A465FC4487E3EE5D1", + "descriptionHash": "6D6707352559D66F205993CC48D594156D55EFB35A56C118DEA259E403B11A1CC8239DC18809BA5616176AEC54471E2525FC88993B1CDF9CC641762785A4D523", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.18.0", diff --git a/pkg/github/repos/item_item_issues_with_issue_escaped_number_item_request_builder.go b/pkg/github/repos/item_item_issues_with_issue_escaped_number_item_request_builder.go index 71f09e53..4e98ebf7 100644 --- a/pkg/github/repos/item_item_issues_with_issue_escaped_number_item_request_builder.go +++ b/pkg/github/repos/item_item_issues_with_issue_escaped_number_item_request_builder.go @@ -73,7 +73,7 @@ func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Labels()(*ItemItemIss func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Lock()(*ItemItemIssuesItemLockRequestBuilder) { return NewItemItemIssuesItemLockRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// Patch issue owners and users with push access can edit an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// Patch issue owners and users with push access or Triage role can edit an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a Issueable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -122,7 +122,7 @@ func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) ToGetRequestInformati requestInfo.Headers.TryAdd("Accept", "application/json") return requestInfo, nil } -// ToPatchRequestInformation issue owners and users with push access can edit an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// ToPatchRequestInformation issue owners and users with push access or Triage role can edit an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. // returns a *RequestInformation when successful func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemIssuesItemWithIssue_numberPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) From 5a9f2c37e44c069ff283d171ccd880316104fa7a Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 4 Oct 2024 00:09:22 +0000 Subject: [PATCH 2/2] New updates to generated code --- pkg/github/kiota-lock.json | 5 +- pkg/github/models/custom_property.go | 53 +++-- pkg/github/models/custom_property_value.go | 53 +++-- .../models/validation_error_escaped_errors.go | 51 +++-- ..._property_escaped_name_put_request_body.go | 53 +++-- ...escaped_checks_contexts_request_builder.go | 186 +++++++++++------- ...tion_restrictions_teams_request_builder.go | 186 +++++++++++------- ...item_issues_item_labels_request_builder.go | 160 ++++++++++++--- pkg/github/user/emails_request_builder.go | 160 ++++++++++++--- 9 files changed, 664 insertions(+), 243 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 77e2b65e..d8f19b6d 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,9 +1,10 @@ { - "descriptionHash": "6D6707352559D66F205993CC48D594156D55EFB35A56C118DEA259E403B11A1CC8239DC18809BA5616176AEC54471E2525FC88993B1CDF9CC641762785A4D523", + "descriptionHash": "5FAA9A17936D273F78B3687421CFFC23344ED506C52677F79ADFF26BFABF57AD8D35CDB43EBF316E73301D91556EFAEEA073EF2DE56B07248D1BA4519BD3A706", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.18.0", + "kiotaVersion": "1.19.0", "clientClassName": "ApiClient", + "typeAccessModifier": "Public", "clientNamespaceName": "github.com/octokit/go-sdk/pkg/github", "language": "Go", "usesBackingStore": false, diff --git a/pkg/github/models/custom_property.go b/pkg/github/models/custom_property.go index b41f3d9e..f661f497 100644 --- a/pkg/github/models/custom_property.go +++ b/pkg/github/models/custom_property.go @@ -25,10 +25,12 @@ type CustomProperty struct { // Who can edit the values of the property values_editable_by *CustomProperty_values_editable_by } -// CustomProperty_CustomProperty_default_value composed type wrapper for classes string +// CustomProperty_CustomProperty_default_value composed type wrapper for classes string, []string type CustomProperty_CustomProperty_default_value struct { // Composed type representation for type string - string *string + customProperty_default_valueString *string + // Composed type representation for type []string + string []string } // NewCustomProperty_CustomProperty_default_value instantiates a new CustomProperty_CustomProperty_default_value and sets the default values. func NewCustomProperty_CustomProperty_default_value()(*CustomProperty_CustomProperty_default_value) { @@ -58,10 +60,26 @@ func CreateCustomProperty_CustomProperty_default_valueFromDiscriminatorValue(par if err != nil { return nil, err } - result.SetString(val) + result.SetCustomPropertyDefaultValueString(val) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } +// GetCustomPropertyDefaultValueString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *CustomProperty_CustomProperty_default_value) GetCustomPropertyDefaultValueString()(*string) { + return m.customProperty_default_valueString +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CustomProperty_CustomProperty_default_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -72,29 +90,40 @@ func (m *CustomProperty_CustomProperty_default_value) GetFieldDeserializers()(ma func (m *CustomProperty_CustomProperty_default_value) GetIsComposedType()(bool) { return true } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *CustomProperty_CustomProperty_default_value) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *CustomProperty_CustomProperty_default_value) GetString()([]string) { return m.string } // Serialize serializes information the current object func (m *CustomProperty_CustomProperty_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + if m.GetCustomPropertyDefaultValueString() != nil { + err := writer.WriteStringValue("", m.GetCustomPropertyDefaultValueString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } } return nil } -// SetString sets the string property value. Composed type representation for type string -func (m *CustomProperty_CustomProperty_default_value) SetString(value *string)() { +// SetCustomPropertyDefaultValueString sets the string property value. Composed type representation for type string +func (m *CustomProperty_CustomProperty_default_value) SetCustomPropertyDefaultValueString(value *string)() { + m.customProperty_default_valueString = value +} +// SetString sets the string property value. Composed type representation for type []string +func (m *CustomProperty_CustomProperty_default_value) SetString(value []string)() { m.string = value } type CustomProperty_CustomProperty_default_valueable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetString()(*string) - SetString(value *string)() + GetCustomPropertyDefaultValueString()(*string) + GetString()([]string) + SetCustomPropertyDefaultValueString(value *string)() + SetString(value []string)() } // NewCustomProperty instantiates a new CustomProperty and sets the default values. func NewCustomProperty()(*CustomProperty) { diff --git a/pkg/github/models/custom_property_value.go b/pkg/github/models/custom_property_value.go index 5608853b..24fd0165 100644 --- a/pkg/github/models/custom_property_value.go +++ b/pkg/github/models/custom_property_value.go @@ -13,10 +13,12 @@ type CustomPropertyValue struct { // The value assigned to the property value CustomPropertyValue_CustomPropertyValue_valueable } -// CustomPropertyValue_CustomPropertyValue_value composed type wrapper for classes string +// CustomPropertyValue_CustomPropertyValue_value composed type wrapper for classes string, []string type CustomPropertyValue_CustomPropertyValue_value struct { // Composed type representation for type string - string *string + customPropertyValue_valueString *string + // Composed type representation for type []string + string []string } // NewCustomPropertyValue_CustomPropertyValue_value instantiates a new CustomPropertyValue_CustomPropertyValue_value and sets the default values. func NewCustomPropertyValue_CustomPropertyValue_value()(*CustomPropertyValue_CustomPropertyValue_value) { @@ -46,10 +48,26 @@ func CreateCustomPropertyValue_CustomPropertyValue_valueFromDiscriminatorValue(p if err != nil { return nil, err } - result.SetString(val) + result.SetCustomPropertyValueValueString(val) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } +// GetCustomPropertyValueValueString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *CustomPropertyValue_CustomPropertyValue_value) GetCustomPropertyValueValueString()(*string) { + return m.customPropertyValue_valueString +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *CustomPropertyValue_CustomPropertyValue_value) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -60,29 +78,40 @@ func (m *CustomPropertyValue_CustomPropertyValue_value) GetFieldDeserializers()( func (m *CustomPropertyValue_CustomPropertyValue_value) GetIsComposedType()(bool) { return true } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *CustomPropertyValue_CustomPropertyValue_value) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *CustomPropertyValue_CustomPropertyValue_value) GetString()([]string) { return m.string } // Serialize serializes information the current object func (m *CustomPropertyValue_CustomPropertyValue_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + if m.GetCustomPropertyValueValueString() != nil { + err := writer.WriteStringValue("", m.GetCustomPropertyValueValueString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } } return nil } -// SetString sets the string property value. Composed type representation for type string -func (m *CustomPropertyValue_CustomPropertyValue_value) SetString(value *string)() { +// SetCustomPropertyValueValueString sets the string property value. Composed type representation for type string +func (m *CustomPropertyValue_CustomPropertyValue_value) SetCustomPropertyValueValueString(value *string)() { + m.customPropertyValue_valueString = value +} +// SetString sets the string property value. Composed type representation for type []string +func (m *CustomPropertyValue_CustomPropertyValue_value) SetString(value []string)() { m.string = value } type CustomPropertyValue_CustomPropertyValue_valueable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetString()(*string) - SetString(value *string)() + GetCustomPropertyValueValueString()(*string) + GetString()([]string) + SetCustomPropertyValueValueString(value *string)() + SetString(value []string)() } // NewCustomPropertyValue instantiates a new CustomPropertyValue and sets the default values. func NewCustomPropertyValue()(*CustomPropertyValue) { diff --git a/pkg/github/models/validation_error_escaped_errors.go b/pkg/github/models/validation_error_escaped_errors.go index 25a901d8..b7dfb62a 100644 --- a/pkg/github/models/validation_error_escaped_errors.go +++ b/pkg/github/models/validation_error_escaped_errors.go @@ -20,12 +20,14 @@ type ValidationError_errors struct { // The value property value ValidationError_errors_ValidationError_errors_valueable } -// ValidationError_errors_ValidationError_errors_value composed type wrapper for classes int32, string +// ValidationError_errors_ValidationError_errors_value composed type wrapper for classes int32, string, []string type ValidationError_errors_ValidationError_errors_value struct { // Composed type representation for type int32 integer *int32 + // Composed type representation for type []string + string []string // Composed type representation for type string - string *string + validationError_errors_valueString *string } // NewValidationError_errors_ValidationError_errors_value instantiates a new ValidationError_errors_ValidationError_errors_value and sets the default values. func NewValidationError_errors_ValidationError_errors_value()(*ValidationError_errors_ValidationError_errors_value) { @@ -60,7 +62,18 @@ func CreateValidationError_errors_ValidationError_errors_valueFromDiscriminatorV if err != nil { return nil, err } - result.SetString(val) + result.SetValidationErrorErrorsValueString(val) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -79,11 +92,16 @@ func (m *ValidationError_errors_ValidationError_errors_value) GetInteger()(*int3 func (m *ValidationError_errors_ValidationError_errors_value) GetIsComposedType()(bool) { return true } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ValidationError_errors_ValidationError_errors_value) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *ValidationError_errors_ValidationError_errors_value) GetString()([]string) { return m.string } +// GetValidationErrorErrorsValueString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ValidationError_errors_ValidationError_errors_value) GetValidationErrorErrorsValueString()(*string) { + return m.validationError_errors_valueString +} // Serialize serializes information the current object func (m *ValidationError_errors_ValidationError_errors_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { if m.GetInteger() != nil { @@ -91,8 +109,13 @@ func (m *ValidationError_errors_ValidationError_errors_value) Serialize(writer i if err != nil { return err } + } else if m.GetValidationErrorErrorsValueString() != nil { + err := writer.WriteStringValue("", m.GetValidationErrorErrorsValueString()) + if err != nil { + return err + } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } @@ -103,16 +126,22 @@ func (m *ValidationError_errors_ValidationError_errors_value) Serialize(writer i func (m *ValidationError_errors_ValidationError_errors_value) SetInteger(value *int32)() { m.integer = value } -// SetString sets the string property value. Composed type representation for type string -func (m *ValidationError_errors_ValidationError_errors_value) SetString(value *string)() { +// SetString sets the string property value. Composed type representation for type []string +func (m *ValidationError_errors_ValidationError_errors_value) SetString(value []string)() { m.string = value } +// SetValidationErrorErrorsValueString sets the string property value. Composed type representation for type string +func (m *ValidationError_errors_ValidationError_errors_value) SetValidationErrorErrorsValueString(value *string)() { + m.validationError_errors_valueString = value +} type ValidationError_errors_ValidationError_errors_valueable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetInteger()(*int32) - GetString()(*string) + GetString()([]string) + GetValidationErrorErrorsValueString()(*string) SetInteger(value *int32)() - SetString(value *string)() + SetString(value []string)() + SetValidationErrorErrorsValueString(value *string)() } // NewValidationError_errors instantiates a new ValidationError_errors and sets the default values. func NewValidationError_errors()(*ValidationError_errors) { diff --git a/pkg/github/orgs/item_properties_schema_item_with_custom_escaped_property_escaped_name_put_request_body.go b/pkg/github/orgs/item_properties_schema_item_with_custom_escaped_property_escaped_name_put_request_body.go index de3b7982..da176ffa 100644 --- a/pkg/github/orgs/item_properties_schema_item_with_custom_escaped_property_escaped_name_put_request_body.go +++ b/pkg/github/orgs/item_properties_schema_item_with_custom_escaped_property_escaped_name_put_request_body.go @@ -16,10 +16,12 @@ type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody struct { // Whether the property is required. required *bool } -// ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value composed type wrapper for classes string +// ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value composed type wrapper for classes string, []string type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value struct { + // Composed type representation for type []string + string []string // Composed type representation for type string - string *string + withCustom_property_namePutRequestBody_default_valueString *string } // NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value instantiates a new ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value and sets the default values. func NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value()(*ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) { @@ -49,7 +51,18 @@ func CreateItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCu if err != nil { return nil, err } - result.SetString(val) + result.SetWithCustomPropertyNamePutRequestBodyDefaultValueString(val) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -63,29 +76,45 @@ func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCust func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetIsComposedType()(bool) { return true } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetString()([]string) { return m.string } +// GetWithCustomPropertyNamePutRequestBodyDefaultValueString gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) GetWithCustomPropertyNamePutRequestBodyDefaultValueString()(*string) { + return m.withCustom_property_namePutRequestBody_default_valueString +} // Serialize serializes information the current object func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + if m.GetWithCustomPropertyNamePutRequestBodyDefaultValueString() != nil { + err := writer.WriteStringValue("", m.GetWithCustomPropertyNamePutRequestBodyDefaultValueString()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } } return nil } -// SetString sets the string property value. Composed type representation for type string -func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) SetString(value *string)() { +// SetString sets the string property value. Composed type representation for type []string +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) SetString(value []string)() { m.string = value } +// SetWithCustomPropertyNamePutRequestBodyDefaultValueString sets the string property value. Composed type representation for type string +func (m *ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_value) SetWithCustomPropertyNamePutRequestBodyDefaultValueString(value *string)() { + m.withCustom_property_namePutRequestBody_default_valueString = value +} type ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody_WithCustom_property_namePutRequestBody_default_valueable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetString()(*string) - SetString(value *string)() + GetString()([]string) + GetWithCustomPropertyNamePutRequestBodyDefaultValueString()(*string) + SetString(value []string)() + SetWithCustomPropertyNamePutRequestBodyDefaultValueString(value *string)() } // NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody instantiates a new ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody and sets the default values. func NewItemPropertiesSchemaItemWithCustom_property_namePutRequestBody()(*ItemPropertiesSchemaItemWithCustom_property_namePutRequestBody) { diff --git a/pkg/github/repos/item_item_branches_item_protection_required_escaped_status_escaped_checks_contexts_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_required_escaped_status_escaped_checks_contexts_request_builder.go index 87785124..fd1efa39 100644 --- a/pkg/github/repos/item_item_branches_item_protection_required_escaped_status_escaped_checks_contexts_request_builder.go +++ b/pkg/github/repos/item_item_branches_item_protection_required_escaped_status_escaped_checks_contexts_request_builder.go @@ -11,16 +11,16 @@ import ( type ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ContextsDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able, string +// ContextsDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able, []string type ContextsDeleteRequestBody struct { // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able contextsDeleteRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able - // Composed type representation for type string - contextsDeleteRequestBodyString *string + // Composed type representation for type []string + contextsDeleteRequestBodyString []string // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able itemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able - // Composed type representation for type string - string *string + // Composed type representation for type []string + string []string } // NewContextsDeleteRequestBody instantiates a new ContextsDeleteRequestBody and sets the default values. func NewContextsDeleteRequestBody()(*ContextsDeleteRequestBody) { @@ -46,16 +46,28 @@ func CreateContextsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d233 } } } - if val, err := parseNode.GetStringValue(); val != nil { + if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetContextsDeleteRequestBodyString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetContextsDeleteRequestBodyString(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetString(val) + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -64,9 +76,9 @@ func CreateContextsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d233 func (m *ContextsDeleteRequestBody) GetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able) { return m.contextsDeleteRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 } -// GetContextsDeleteRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ContextsDeleteRequestBody) GetContextsDeleteRequestBodyString()(*string) { +// GetContextsDeleteRequestBodyString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *ContextsDeleteRequestBody) GetContextsDeleteRequestBodyString()([]string) { return m.contextsDeleteRequestBodyString } // GetFieldDeserializers the deserialization information for the current model @@ -84,9 +96,9 @@ func (m *ContextsDeleteRequestBody) GetIsComposedType()(bool) { func (m *ContextsDeleteRequestBody) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able) { return m.itemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ContextsDeleteRequestBody) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *ContextsDeleteRequestBody) GetString()([]string) { return m.string } // Serialize serializes information the current object @@ -102,12 +114,12 @@ func (m *ContextsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f return err } } else if m.GetContextsDeleteRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetContextsDeleteRequestBodyString()) + err := writer.WriteCollectionOfStringValues("", m.GetContextsDeleteRequestBodyString()) if err != nil { return err } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } @@ -118,28 +130,28 @@ func (m *ContextsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f func (m *ContextsDeleteRequestBody) SetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able)() { m.contextsDeleteRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 = value } -// SetContextsDeleteRequestBodyString sets the string property value. Composed type representation for type string -func (m *ContextsDeleteRequestBody) SetContextsDeleteRequestBodyString(value *string)() { +// SetContextsDeleteRequestBodyString sets the string property value. Composed type representation for type []string +func (m *ContextsDeleteRequestBody) SetContextsDeleteRequestBodyString(value []string)() { m.contextsDeleteRequestBodyString = value } // SetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able func (m *ContextsDeleteRequestBody) SetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able)() { m.itemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1 = value } -// SetString sets the string property value. Composed type representation for type string -func (m *ContextsDeleteRequestBody) SetString(value *string)() { +// SetString sets the string property value. Composed type representation for type []string +func (m *ContextsDeleteRequestBody) SetString(value []string)() { m.string = value } -// ContextsPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able, string +// ContextsPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able, []string type ContextsPostRequestBody struct { // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able contextsPostRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able - // Composed type representation for type string - contextsPostRequestBodyString *string + // Composed type representation for type []string + contextsPostRequestBodyString []string // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able itemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able - // Composed type representation for type string - string *string + // Composed type representation for type []string + string []string } // NewContextsPostRequestBody instantiates a new ContextsPostRequestBody and sets the default values. func NewContextsPostRequestBody()(*ContextsPostRequestBody) { @@ -165,16 +177,28 @@ func CreateContextsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e } } } - if val, err := parseNode.GetStringValue(); val != nil { + if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetContextsPostRequestBodyString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetContextsPostRequestBodyString(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetString(val) + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -183,9 +207,9 @@ func CreateContextsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e func (m *ContextsPostRequestBody) GetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able) { return m.contextsPostRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 } -// GetContextsPostRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ContextsPostRequestBody) GetContextsPostRequestBodyString()(*string) { +// GetContextsPostRequestBodyString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *ContextsPostRequestBody) GetContextsPostRequestBodyString()([]string) { return m.contextsPostRequestBodyString } // GetFieldDeserializers the deserialization information for the current model @@ -203,9 +227,9 @@ func (m *ContextsPostRequestBody) GetIsComposedType()(bool) { func (m *ContextsPostRequestBody) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able) { return m.itemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ContextsPostRequestBody) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *ContextsPostRequestBody) GetString()([]string) { return m.string } // Serialize serializes information the current object @@ -221,12 +245,12 @@ func (m *ContextsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f48 return err } } else if m.GetContextsPostRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetContextsPostRequestBodyString()) + err := writer.WriteCollectionOfStringValues("", m.GetContextsPostRequestBodyString()) if err != nil { return err } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } @@ -237,28 +261,28 @@ func (m *ContextsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f48 func (m *ContextsPostRequestBody) SetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able)() { m.contextsPostRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 = value } -// SetContextsPostRequestBodyString sets the string property value. Composed type representation for type string -func (m *ContextsPostRequestBody) SetContextsPostRequestBodyString(value *string)() { +// SetContextsPostRequestBodyString sets the string property value. Composed type representation for type []string +func (m *ContextsPostRequestBody) SetContextsPostRequestBodyString(value []string)() { m.contextsPostRequestBodyString = value } // SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able func (m *ContextsPostRequestBody) SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able)() { m.itemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1 = value } -// SetString sets the string property value. Composed type representation for type string -func (m *ContextsPostRequestBody) SetString(value *string)() { +// SetString sets the string property value. Composed type representation for type []string +func (m *ContextsPostRequestBody) SetString(value []string)() { m.string = value } -// ContextsPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able, string +// ContextsPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able, []string type ContextsPutRequestBody struct { // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able contextsPutRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able - // Composed type representation for type string - contextsPutRequestBodyString *string + // Composed type representation for type []string + contextsPutRequestBodyString []string // Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able itemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able - // Composed type representation for type string - string *string + // Composed type representation for type []string + string []string } // NewContextsPutRequestBody instantiates a new ContextsPutRequestBody and sets the default values. func NewContextsPutRequestBody()(*ContextsPutRequestBody) { @@ -284,16 +308,28 @@ func CreateContextsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e8 } } } - if val, err := parseNode.GetStringValue(); val != nil { + if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetContextsPutRequestBodyString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetContextsPutRequestBodyString(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetString(val) + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -302,9 +338,9 @@ func CreateContextsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e8 func (m *ContextsPutRequestBody) GetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able) { return m.contextsPutRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 } -// GetContextsPutRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ContextsPutRequestBody) GetContextsPutRequestBodyString()(*string) { +// GetContextsPutRequestBodyString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *ContextsPutRequestBody) GetContextsPutRequestBodyString()([]string) { return m.contextsPutRequestBodyString } // GetFieldDeserializers the deserialization information for the current model @@ -322,9 +358,9 @@ func (m *ContextsPutRequestBody) GetIsComposedType()(bool) { func (m *ContextsPutRequestBody) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able) { return m.itemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *ContextsPutRequestBody) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *ContextsPutRequestBody) GetString()([]string) { return m.string } // Serialize serializes information the current object @@ -340,12 +376,12 @@ func (m *ContextsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } else if m.GetContextsPutRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetContextsPutRequestBodyString()) + err := writer.WriteCollectionOfStringValues("", m.GetContextsPutRequestBodyString()) if err != nil { return err } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } @@ -356,50 +392,50 @@ func (m *ContextsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487 func (m *ContextsPutRequestBody) SetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able)() { m.contextsPutRequestBodyItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 = value } -// SetContextsPutRequestBodyString sets the string property value. Composed type representation for type string -func (m *ContextsPutRequestBody) SetContextsPutRequestBodyString(value *string)() { +// SetContextsPutRequestBodyString sets the string property value. Composed type representation for type []string +func (m *ContextsPutRequestBody) SetContextsPutRequestBodyString(value []string)() { m.contextsPutRequestBodyString = value } // SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able func (m *ContextsPutRequestBody) SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able)() { m.itemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1 = value } -// SetString sets the string property value. Composed type representation for type string -func (m *ContextsPutRequestBody) SetString(value *string)() { +// SetString sets the string property value. Composed type representation for type []string +func (m *ContextsPutRequestBody) SetString(value []string)() { m.string = value } type ContextsDeleteRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able) - GetContextsDeleteRequestBodyString()(*string) + GetContextsDeleteRequestBodyString()([]string) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able) - GetString()(*string) + GetString()([]string) SetContextsDeleteRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able)() - SetContextsDeleteRequestBodyString(value *string)() + SetContextsDeleteRequestBodyString(value []string)() SetItemItemBranchesItemProtectionRequiredStatusChecksContextsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsDeleteRequestBodyMember1able)() - SetString(value *string)() + SetString(value []string)() } type ContextsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able) - GetContextsPostRequestBodyString()(*string) + GetContextsPostRequestBodyString()([]string) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able) - GetString()(*string) + GetString()([]string) SetContextsPostRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able)() - SetContextsPostRequestBodyString(value *string)() + SetContextsPostRequestBodyString(value []string)() SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPostRequestBodyMember1able)() - SetString(value *string)() + SetString(value []string)() } type ContextsPutRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able) - GetContextsPutRequestBodyString()(*string) + GetContextsPutRequestBodyString()([]string) GetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able) - GetString()(*string) + GetString()([]string) SetContextsPutRequestBodyItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able)() - SetContextsPutRequestBodyString(value *string)() + SetContextsPutRequestBodyString(value []string)() SetItemItemBranchesItemProtectionRequiredStatusChecksContextsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRequired_status_checksContextsPutRequestBodyMember1able)() - SetString(value *string)() + SetString(value []string)() } // NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder and sets the default values. func NewItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRequired_status_checksContextsRequestBuilder) { diff --git a/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_request_builder.go b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_request_builder.go index b888d42d..849aa414 100644 --- a/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_request_builder.go +++ b/pkg/github/repos/item_item_branches_item_protection_restrictions_teams_request_builder.go @@ -11,16 +11,16 @@ import ( type ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// TeamsDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able, string +// TeamsDeleteRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able, []string type TeamsDeleteRequestBody struct { // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able itemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able - // Composed type representation for type string - string *string + // Composed type representation for type []string + string []string // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able teamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able - // Composed type representation for type string - teamsDeleteRequestBodyString *string + // Composed type representation for type []string + teamsDeleteRequestBodyString []string } // NewTeamsDeleteRequestBody instantiates a new TeamsDeleteRequestBody and sets the default values. func NewTeamsDeleteRequestBody()(*TeamsDeleteRequestBody) { @@ -46,16 +46,28 @@ func CreateTeamsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e8 } } } - if val, err := parseNode.GetStringValue(); val != nil { + if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetTeamsDeleteRequestBodyString(val) + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetTeamsDeleteRequestBodyString(cast) } return result, nil } @@ -74,9 +86,9 @@ func (m *TeamsDeleteRequestBody) GetIsComposedType()(bool) { func (m *TeamsDeleteRequestBody) GetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able) { return m.itemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *TeamsDeleteRequestBody) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *TeamsDeleteRequestBody) GetString()([]string) { return m.string } // GetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able @@ -84,9 +96,9 @@ func (m *TeamsDeleteRequestBody) GetString()(*string) { func (m *TeamsDeleteRequestBody) GetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able) { return m.teamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 } -// GetTeamsDeleteRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *TeamsDeleteRequestBody) GetTeamsDeleteRequestBodyString()(*string) { +// GetTeamsDeleteRequestBodyString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *TeamsDeleteRequestBody) GetTeamsDeleteRequestBodyString()([]string) { return m.teamsDeleteRequestBodyString } // Serialize serializes information the current object @@ -102,12 +114,12 @@ func (m *TeamsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } } else if m.GetTeamsDeleteRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetTeamsDeleteRequestBodyString()) + err := writer.WriteCollectionOfStringValues("", m.GetTeamsDeleteRequestBodyString()) if err != nil { return err } @@ -118,28 +130,28 @@ func (m *TeamsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487 func (m *TeamsDeleteRequestBody) SetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able)() { m.itemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 = value } -// SetString sets the string property value. Composed type representation for type string -func (m *TeamsDeleteRequestBody) SetString(value *string)() { +// SetString sets the string property value. Composed type representation for type []string +func (m *TeamsDeleteRequestBody) SetString(value []string)() { m.string = value } // SetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able func (m *TeamsDeleteRequestBody) SetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able)() { m.teamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1 = value } -// SetTeamsDeleteRequestBodyString sets the string property value. Composed type representation for type string -func (m *TeamsDeleteRequestBody) SetTeamsDeleteRequestBodyString(value *string)() { +// SetTeamsDeleteRequestBodyString sets the string property value. Composed type representation for type []string +func (m *TeamsDeleteRequestBody) SetTeamsDeleteRequestBodyString(value []string)() { m.teamsDeleteRequestBodyString = value } -// TeamsPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able, string +// TeamsPostRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able, []string type TeamsPostRequestBody struct { // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able itemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able - // Composed type representation for type string - string *string + // Composed type representation for type []string + string []string // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able teamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able - // Composed type representation for type string - teamsPostRequestBodyString *string + // Composed type representation for type []string + teamsPostRequestBodyString []string } // NewTeamsPostRequestBody instantiates a new TeamsPostRequestBody and sets the default values. func NewTeamsPostRequestBody()(*TeamsPostRequestBody) { @@ -165,16 +177,28 @@ func CreateTeamsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d } } } - if val, err := parseNode.GetStringValue(); val != nil { + if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetTeamsPostRequestBodyString(val) + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetTeamsPostRequestBodyString(cast) } return result, nil } @@ -193,9 +217,9 @@ func (m *TeamsPostRequestBody) GetIsComposedType()(bool) { func (m *TeamsPostRequestBody) GetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able) { return m.itemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *TeamsPostRequestBody) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *TeamsPostRequestBody) GetString()([]string) { return m.string } // GetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able @@ -203,9 +227,9 @@ func (m *TeamsPostRequestBody) GetString()(*string) { func (m *TeamsPostRequestBody) GetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able) { return m.teamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 } -// GetTeamsPostRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *TeamsPostRequestBody) GetTeamsPostRequestBodyString()(*string) { +// GetTeamsPostRequestBodyString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *TeamsPostRequestBody) GetTeamsPostRequestBodyString()([]string) { return m.teamsPostRequestBodyString } // Serialize serializes information the current object @@ -221,12 +245,12 @@ func (m *TeamsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487ee return err } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } } else if m.GetTeamsPostRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetTeamsPostRequestBodyString()) + err := writer.WriteCollectionOfStringValues("", m.GetTeamsPostRequestBodyString()) if err != nil { return err } @@ -237,28 +261,28 @@ func (m *TeamsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487ee func (m *TeamsPostRequestBody) SetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able)() { m.itemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 = value } -// SetString sets the string property value. Composed type representation for type string -func (m *TeamsPostRequestBody) SetString(value *string)() { +// SetString sets the string property value. Composed type representation for type []string +func (m *TeamsPostRequestBody) SetString(value []string)() { m.string = value } // SetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able func (m *TeamsPostRequestBody) SetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able)() { m.teamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1 = value } -// SetTeamsPostRequestBodyString sets the string property value. Composed type representation for type string -func (m *TeamsPostRequestBody) SetTeamsPostRequestBodyString(value *string)() { +// SetTeamsPostRequestBodyString sets the string property value. Composed type representation for type []string +func (m *TeamsPostRequestBody) SetTeamsPostRequestBodyString(value []string)() { m.teamsPostRequestBodyString = value } -// TeamsPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able, string +// TeamsPutRequestBody composed type wrapper for classes ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able, []string type TeamsPutRequestBody struct { // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able itemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able - // Composed type representation for type string - string *string + // Composed type representation for type []string + string []string // Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able teamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able - // Composed type representation for type string - teamsPutRequestBodyString *string + // Composed type representation for type []string + teamsPutRequestBodyString []string } // NewTeamsPutRequestBody instantiates a new TeamsPutRequestBody and sets the default values. func NewTeamsPutRequestBody()(*TeamsPutRequestBody) { @@ -284,16 +308,28 @@ func CreateTeamsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d2 } } } - if val, err := parseNode.GetStringValue(); val != nil { + if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetString(val) - } else if val, err := parseNode.GetStringValue(); val != nil { + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { if err != nil { return nil, err } - result.SetTeamsPutRequestBodyString(val) + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetTeamsPutRequestBodyString(cast) } return result, nil } @@ -312,9 +348,9 @@ func (m *TeamsPutRequestBody) GetIsComposedType()(bool) { func (m *TeamsPutRequestBody) GetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able) { return m.itemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *TeamsPutRequestBody) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *TeamsPutRequestBody) GetString()([]string) { return m.string } // GetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 gets the ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able @@ -322,9 +358,9 @@ func (m *TeamsPutRequestBody) GetString()(*string) { func (m *TeamsPutRequestBody) GetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able) { return m.teamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 } -// GetTeamsPutRequestBodyString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *TeamsPutRequestBody) GetTeamsPutRequestBodyString()(*string) { +// GetTeamsPutRequestBodyString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *TeamsPutRequestBody) GetTeamsPutRequestBodyString()([]string) { return m.teamsPutRequestBodyString } // Serialize serializes information the current object @@ -340,12 +376,12 @@ func (m *TeamsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } } else if m.GetTeamsPutRequestBodyString() != nil { - err := writer.WriteStringValue("", m.GetTeamsPutRequestBodyString()) + err := writer.WriteCollectionOfStringValues("", m.GetTeamsPutRequestBodyString()) if err != nil { return err } @@ -356,50 +392,50 @@ func (m *TeamsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef func (m *TeamsPutRequestBody) SetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able)() { m.itemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 = value } -// SetString sets the string property value. Composed type representation for type string -func (m *TeamsPutRequestBody) SetString(value *string)() { +// SetString sets the string property value. Composed type representation for type []string +func (m *TeamsPutRequestBody) SetString(value []string)() { m.string = value } // SetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 sets the ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 property value. Composed type representation for type ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able func (m *TeamsPutRequestBody) SetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able)() { m.teamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1 = value } -// SetTeamsPutRequestBodyString sets the string property value. Composed type representation for type string -func (m *TeamsPutRequestBody) SetTeamsPutRequestBodyString(value *string)() { +// SetTeamsPutRequestBodyString sets the string property value. Composed type representation for type []string +func (m *TeamsPutRequestBody) SetTeamsPutRequestBodyString(value []string)() { m.teamsPutRequestBodyString = value } type TeamsDeleteRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able) - GetString()(*string) + GetString()([]string) GetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able) - GetTeamsDeleteRequestBodyString()(*string) + GetTeamsDeleteRequestBodyString()([]string) SetItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able)() - SetString(value *string)() + SetString(value []string)() SetTeamsDeleteRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsDeleteRequestBodyMember1able)() - SetTeamsDeleteRequestBodyString(value *string)() + SetTeamsDeleteRequestBodyString(value []string)() } type TeamsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able) - GetString()(*string) + GetString()([]string) GetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able) - GetTeamsPostRequestBodyString()(*string) + GetTeamsPostRequestBodyString()([]string) SetItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able)() - SetString(value *string)() + SetString(value []string)() SetTeamsPostRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPostRequestBodyMember1able)() - SetTeamsPostRequestBodyString(value *string)() + SetTeamsPostRequestBodyString(value []string)() } type TeamsPutRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able) - GetString()(*string) + GetString()([]string) GetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1()(ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able) - GetTeamsPutRequestBodyString()(*string) + GetTeamsPutRequestBodyString()([]string) SetItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able)() - SetString(value *string)() + SetString(value []string)() SetTeamsPutRequestBodyItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1(value ItemItemBranchesItemProtectionRestrictionsTeamsPutRequestBodyMember1able)() - SetTeamsPutRequestBodyString(value *string)() + SetTeamsPutRequestBodyString(value []string)() } // NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilderInternal instantiates a new ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder and sets the default values. func NewItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemBranchesItemProtectionRestrictionsTeamsRequestBuilder) { diff --git a/pkg/github/repos/item_item_issues_item_labels_request_builder.go b/pkg/github/repos/item_item_issues_item_labels_request_builder.go index fa91e8de..427922f1 100644 --- a/pkg/github/repos/item_item_issues_item_labels_request_builder.go +++ b/pkg/github/repos/item_item_issues_item_labels_request_builder.go @@ -18,7 +18,7 @@ type ItemItemIssuesItemLabelsRequestBuilderGetQueryParameters struct { // 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"` } -// LabelsPostRequestBody composed type wrapper for classes ItemItemIssuesItemLabelsPostRequestBodyMember1able, ItemItemIssuesItemLabelsPostRequestBodyMember2able, string, []ItemItemIssuesItemLabelsPostRequestBodyMember3able +// LabelsPostRequestBody composed type wrapper for classes ItemItemIssuesItemLabelsPostRequestBodyMember1able, ItemItemIssuesItemLabelsPostRequestBodyMember2able, string, []ItemItemIssuesItemLabelsPostRequestBodyMember3able, []string type LabelsPostRequestBody struct { // Composed type representation for type ItemItemIssuesItemLabelsPostRequestBodyMember1able itemItemIssuesItemLabelsPostRequestBodyMember1 ItemItemIssuesItemLabelsPostRequestBodyMember1able @@ -34,8 +34,12 @@ type LabelsPostRequestBody struct { labelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3 []ItemItemIssuesItemLabelsPostRequestBodyMember3able // Composed type representation for type string labelsPostRequestBodyString *string + // Composed type representation for type []string + labelsPostRequestBodyString0 []string // Composed type representation for type string - string *string + labelsPostRequestBodyString1 *string + // Composed type representation for type []string + string []string } // NewLabelsPostRequestBody instantiates a new LabelsPostRequestBody and sets the default values. func NewLabelsPostRequestBody()(*LabelsPostRequestBody) { @@ -70,7 +74,7 @@ func CreateLabelsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89 if err != nil { return nil, err } - result.SetString(val) + result.SetLabelsPostRequestBodyString1(val) } else if val, err := parseNode.GetCollectionOfObjectValues(CreateItemItemIssuesItemLabelsPostRequestBodyMember3FromDiscriminatorValue); val != nil { if err != nil { return nil, err @@ -93,6 +97,28 @@ func CreateLabelsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89 } } result.SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetLabelsPostRequestBodyString0(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -141,9 +167,19 @@ func (m *LabelsPostRequestBody) GetLabelsPostRequestBodyItemItemIssuesItemLabels func (m *LabelsPostRequestBody) GetLabelsPostRequestBodyString()(*string) { return m.labelsPostRequestBodyString } -// GetString gets the string property value. Composed type representation for type string +// GetLabelsPostRequestBodyString0 gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *LabelsPostRequestBody) GetLabelsPostRequestBodyString0()([]string) { + return m.labelsPostRequestBodyString0 +} +// GetLabelsPostRequestBodyString1 gets the string property value. Composed type representation for type string // returns a *string when successful -func (m *LabelsPostRequestBody) GetString()(*string) { +func (m *LabelsPostRequestBody) GetLabelsPostRequestBodyString1()(*string) { + return m.labelsPostRequestBodyString1 +} +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *LabelsPostRequestBody) GetString()([]string) { return m.string } // Serialize serializes information the current object @@ -173,8 +209,8 @@ func (m *LabelsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487e if err != nil { return err } - } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + } else if m.GetLabelsPostRequestBodyString1() != nil { + err := writer.WriteStringValue("", m.GetLabelsPostRequestBodyString1()) if err != nil { return err } @@ -200,6 +236,16 @@ func (m *LabelsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487e if err != nil { return err } + } else if m.GetLabelsPostRequestBodyString0() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetLabelsPostRequestBodyString0()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetString()) + if err != nil { + return err + } } return nil } @@ -231,11 +277,19 @@ func (m *LabelsPostRequestBody) SetLabelsPostRequestBodyItemItemIssuesItemLabels func (m *LabelsPostRequestBody) SetLabelsPostRequestBodyString(value *string)() { m.labelsPostRequestBodyString = value } -// SetString sets the string property value. Composed type representation for type string -func (m *LabelsPostRequestBody) SetString(value *string)() { +// SetLabelsPostRequestBodyString0 sets the string property value. Composed type representation for type []string +func (m *LabelsPostRequestBody) SetLabelsPostRequestBodyString0(value []string)() { + m.labelsPostRequestBodyString0 = value +} +// SetLabelsPostRequestBodyString1 sets the string property value. Composed type representation for type string +func (m *LabelsPostRequestBody) SetLabelsPostRequestBodyString1(value *string)() { + m.labelsPostRequestBodyString1 = value +} +// SetString sets the string property value. Composed type representation for type []string +func (m *LabelsPostRequestBody) SetString(value []string)() { m.string = value } -// LabelsPutRequestBody composed type wrapper for classes ItemItemIssuesItemLabelsPutRequestBodyMember1able, ItemItemIssuesItemLabelsPutRequestBodyMember2able, string, []ItemItemIssuesItemLabelsPutRequestBodyMember3able +// LabelsPutRequestBody composed type wrapper for classes ItemItemIssuesItemLabelsPutRequestBodyMember1able, ItemItemIssuesItemLabelsPutRequestBodyMember2able, string, []ItemItemIssuesItemLabelsPutRequestBodyMember3able, []string type LabelsPutRequestBody struct { // Composed type representation for type ItemItemIssuesItemLabelsPutRequestBodyMember1able itemItemIssuesItemLabelsPutRequestBodyMember1 ItemItemIssuesItemLabelsPutRequestBodyMember1able @@ -251,8 +305,12 @@ type LabelsPutRequestBody struct { labelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3 []ItemItemIssuesItemLabelsPutRequestBodyMember3able // Composed type representation for type string labelsPutRequestBodyString *string + // Composed type representation for type []string + labelsPutRequestBodyString0 []string // Composed type representation for type string - string *string + labelsPutRequestBodyString1 *string + // Composed type representation for type []string + string []string } // NewLabelsPutRequestBody instantiates a new LabelsPutRequestBody and sets the default values. func NewLabelsPutRequestBody()(*LabelsPutRequestBody) { @@ -287,7 +345,7 @@ func CreateLabelsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d if err != nil { return nil, err } - result.SetString(val) + result.SetLabelsPutRequestBodyString1(val) } else if val, err := parseNode.GetCollectionOfObjectValues(CreateItemItemIssuesItemLabelsPutRequestBodyMember3FromDiscriminatorValue); val != nil { if err != nil { return nil, err @@ -310,6 +368,28 @@ func CreateLabelsPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d } } result.SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetLabelsPutRequestBodyString0(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -358,9 +438,19 @@ func (m *LabelsPutRequestBody) GetLabelsPutRequestBodyItemItemIssuesItemLabelsPu func (m *LabelsPutRequestBody) GetLabelsPutRequestBodyString()(*string) { return m.labelsPutRequestBodyString } -// GetString gets the string property value. Composed type representation for type string +// GetLabelsPutRequestBodyString0 gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *LabelsPutRequestBody) GetLabelsPutRequestBodyString0()([]string) { + return m.labelsPutRequestBodyString0 +} +// GetLabelsPutRequestBodyString1 gets the string property value. Composed type representation for type string // returns a *string when successful -func (m *LabelsPutRequestBody) GetString()(*string) { +func (m *LabelsPutRequestBody) GetLabelsPutRequestBodyString1()(*string) { + return m.labelsPutRequestBodyString1 +} +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *LabelsPutRequestBody) GetString()([]string) { return m.string } // Serialize serializes information the current object @@ -390,8 +480,8 @@ func (m *LabelsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487ee if err != nil { return err } - } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + } else if m.GetLabelsPutRequestBodyString1() != nil { + err := writer.WriteStringValue("", m.GetLabelsPutRequestBodyString1()) if err != nil { return err } @@ -417,6 +507,16 @@ func (m *LabelsPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487ee if err != nil { return err } + } else if m.GetLabelsPutRequestBodyString0() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetLabelsPutRequestBodyString0()) + if err != nil { + return err + } + } else if m.GetString() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetString()) + if err != nil { + return err + } } return nil } @@ -448,8 +548,16 @@ func (m *LabelsPutRequestBody) SetLabelsPutRequestBodyItemItemIssuesItemLabelsPu func (m *LabelsPutRequestBody) SetLabelsPutRequestBodyString(value *string)() { m.labelsPutRequestBodyString = value } -// SetString sets the string property value. Composed type representation for type string -func (m *LabelsPutRequestBody) SetString(value *string)() { +// SetLabelsPutRequestBodyString0 sets the string property value. Composed type representation for type []string +func (m *LabelsPutRequestBody) SetLabelsPutRequestBodyString0(value []string)() { + m.labelsPutRequestBodyString0 = value +} +// SetLabelsPutRequestBodyString1 sets the string property value. Composed type representation for type string +func (m *LabelsPutRequestBody) SetLabelsPutRequestBodyString1(value *string)() { + m.labelsPutRequestBodyString1 = value +} +// SetString sets the string property value. Composed type representation for type []string +func (m *LabelsPutRequestBody) SetString(value []string)() { m.string = value } type LabelsPostRequestBodyable interface { @@ -461,7 +569,9 @@ type LabelsPostRequestBodyable interface { GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2()(ItemItemIssuesItemLabelsPostRequestBodyMember2able) GetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3()([]ItemItemIssuesItemLabelsPostRequestBodyMember3able) GetLabelsPostRequestBodyString()(*string) - GetString()(*string) + GetLabelsPostRequestBodyString0()([]string) + GetLabelsPostRequestBodyString1()(*string) + GetString()([]string) SetItemItemIssuesItemLabelsPostRequestBodyMember1(value ItemItemIssuesItemLabelsPostRequestBodyMember1able)() SetItemItemIssuesItemLabelsPostRequestBodyMember2(value ItemItemIssuesItemLabelsPostRequestBodyMember2able)() SetItemItemIssuesItemLabelsPostRequestBodyMember3(value []ItemItemIssuesItemLabelsPostRequestBodyMember3able)() @@ -469,7 +579,9 @@ type LabelsPostRequestBodyable interface { SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember2(value ItemItemIssuesItemLabelsPostRequestBodyMember2able)() SetLabelsPostRequestBodyItemItemIssuesItemLabelsPostRequestBodyMember3(value []ItemItemIssuesItemLabelsPostRequestBodyMember3able)() SetLabelsPostRequestBodyString(value *string)() - SetString(value *string)() + SetLabelsPostRequestBodyString0(value []string)() + SetLabelsPostRequestBodyString1(value *string)() + SetString(value []string)() } type LabelsPutRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -480,7 +592,9 @@ type LabelsPutRequestBodyable interface { GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2()(ItemItemIssuesItemLabelsPutRequestBodyMember2able) GetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3()([]ItemItemIssuesItemLabelsPutRequestBodyMember3able) GetLabelsPutRequestBodyString()(*string) - GetString()(*string) + GetLabelsPutRequestBodyString0()([]string) + GetLabelsPutRequestBodyString1()(*string) + GetString()([]string) SetItemItemIssuesItemLabelsPutRequestBodyMember1(value ItemItemIssuesItemLabelsPutRequestBodyMember1able)() SetItemItemIssuesItemLabelsPutRequestBodyMember2(value ItemItemIssuesItemLabelsPutRequestBodyMember2able)() SetItemItemIssuesItemLabelsPutRequestBodyMember3(value []ItemItemIssuesItemLabelsPutRequestBodyMember3able)() @@ -488,7 +602,9 @@ type LabelsPutRequestBodyable interface { SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember2(value ItemItemIssuesItemLabelsPutRequestBodyMember2able)() SetLabelsPutRequestBodyItemItemIssuesItemLabelsPutRequestBodyMember3(value []ItemItemIssuesItemLabelsPutRequestBodyMember3able)() SetLabelsPutRequestBodyString(value *string)() - SetString(value *string)() + SetLabelsPutRequestBodyString0(value []string)() + SetLabelsPutRequestBodyString1(value *string)() + SetString(value []string)() } // ByName gets an item from the github.com/octokit/go-sdk/pkg/github.repos.item.item.issues.item.labels.item collection // returns a *ItemItemIssuesItemLabelsWithNameItemRequestBuilder when successful diff --git a/pkg/github/user/emails_request_builder.go b/pkg/github/user/emails_request_builder.go index 63d70dd1..c6de762b 100644 --- a/pkg/github/user/emails_request_builder.go +++ b/pkg/github/user/emails_request_builder.go @@ -11,7 +11,7 @@ import ( type EmailsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// EmailsDeleteRequestBody composed type wrapper for classes EmailsDeleteRequestBodyMember1able, string +// EmailsDeleteRequestBody composed type wrapper for classes EmailsDeleteRequestBodyMember1able, string, []string type EmailsDeleteRequestBody struct { // Composed type representation for type EmailsDeleteRequestBodyMember1able emailsDeleteRequestBodyEmailsDeleteRequestBodyMember1 EmailsDeleteRequestBodyMember1able @@ -19,8 +19,12 @@ type EmailsDeleteRequestBody struct { emailsDeleteRequestBodyMember1 EmailsDeleteRequestBodyMember1able // Composed type representation for type string emailsDeleteRequestBodyString *string + // Composed type representation for type []string + emailsDeleteRequestBodyString0 []string // Composed type representation for type string - string *string + emailsDeleteRequestBodyString1 *string + // Composed type representation for type []string + string []string } // NewEmailsDeleteRequestBody instantiates a new EmailsDeleteRequestBody and sets the default values. func NewEmailsDeleteRequestBody()(*EmailsDeleteRequestBody) { @@ -55,7 +59,29 @@ func CreateEmailsDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e if err != nil { return nil, err } - result.SetString(val) + result.SetEmailsDeleteRequestBodyString1(val) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetEmailsDeleteRequestBodyString0(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -74,6 +100,16 @@ func (m *EmailsDeleteRequestBody) GetEmailsDeleteRequestBodyMember1()(EmailsDele func (m *EmailsDeleteRequestBody) GetEmailsDeleteRequestBodyString()(*string) { return m.emailsDeleteRequestBodyString } +// GetEmailsDeleteRequestBodyString0 gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *EmailsDeleteRequestBody) GetEmailsDeleteRequestBodyString0()([]string) { + return m.emailsDeleteRequestBodyString0 +} +// GetEmailsDeleteRequestBodyString1 gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *EmailsDeleteRequestBody) GetEmailsDeleteRequestBodyString1()(*string) { + return m.emailsDeleteRequestBodyString1 +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *EmailsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -84,9 +120,9 @@ func (m *EmailsDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a8 func (m *EmailsDeleteRequestBody) GetIsComposedType()(bool) { return true } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *EmailsDeleteRequestBody) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *EmailsDeleteRequestBody) GetString()([]string) { return m.string } // Serialize serializes information the current object @@ -106,8 +142,18 @@ func (m *EmailsDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f48 if err != nil { return err } + } else if m.GetEmailsDeleteRequestBodyString1() != nil { + err := writer.WriteStringValue("", m.GetEmailsDeleteRequestBodyString1()) + if err != nil { + return err + } + } else if m.GetEmailsDeleteRequestBodyString0() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetEmailsDeleteRequestBodyString0()) + if err != nil { + return err + } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } @@ -126,11 +172,19 @@ func (m *EmailsDeleteRequestBody) SetEmailsDeleteRequestBodyMember1(value Emails func (m *EmailsDeleteRequestBody) SetEmailsDeleteRequestBodyString(value *string)() { m.emailsDeleteRequestBodyString = value } -// SetString sets the string property value. Composed type representation for type string -func (m *EmailsDeleteRequestBody) SetString(value *string)() { +// SetEmailsDeleteRequestBodyString0 sets the string property value. Composed type representation for type []string +func (m *EmailsDeleteRequestBody) SetEmailsDeleteRequestBodyString0(value []string)() { + m.emailsDeleteRequestBodyString0 = value +} +// SetEmailsDeleteRequestBodyString1 sets the string property value. Composed type representation for type string +func (m *EmailsDeleteRequestBody) SetEmailsDeleteRequestBodyString1(value *string)() { + m.emailsDeleteRequestBodyString1 = value +} +// SetString sets the string property value. Composed type representation for type []string +func (m *EmailsDeleteRequestBody) SetString(value []string)() { m.string = value } -// EmailsPostRequestBody composed type wrapper for classes EmailsPostRequestBodyMember1able, string +// EmailsPostRequestBody composed type wrapper for classes EmailsPostRequestBodyMember1able, string, []string type EmailsPostRequestBody struct { // Composed type representation for type EmailsPostRequestBodyMember1able emailsPostRequestBodyEmailsPostRequestBodyMember1 EmailsPostRequestBodyMember1able @@ -138,8 +192,12 @@ type EmailsPostRequestBody struct { emailsPostRequestBodyMember1 EmailsPostRequestBodyMember1able // Composed type representation for type string emailsPostRequestBodyString *string + // Composed type representation for type []string + emailsPostRequestBodyString0 []string // Composed type representation for type string - string *string + emailsPostRequestBodyString1 *string + // Composed type representation for type []string + string []string } // NewEmailsPostRequestBody instantiates a new EmailsPostRequestBody and sets the default values. func NewEmailsPostRequestBody()(*EmailsPostRequestBody) { @@ -174,7 +232,29 @@ func CreateEmailsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89 if err != nil { return nil, err } - result.SetString(val) + result.SetEmailsPostRequestBodyString1(val) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetEmailsPostRequestBodyString0(cast) + } else if val, err := parseNode.GetCollectionOfPrimitiveValues("string"); val != nil { + if err != nil { + return nil, err + } + cast := make([]string, len(val)) + for i, v := range val { + if v != nil { + cast[i] = *(v.(*string)) + } + } + result.SetString(cast) } return result, nil } @@ -193,6 +273,16 @@ func (m *EmailsPostRequestBody) GetEmailsPostRequestBodyMember1()(EmailsPostRequ func (m *EmailsPostRequestBody) GetEmailsPostRequestBodyString()(*string) { return m.emailsPostRequestBodyString } +// GetEmailsPostRequestBodyString0 gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *EmailsPostRequestBody) GetEmailsPostRequestBodyString0()([]string) { + return m.emailsPostRequestBodyString0 +} +// GetEmailsPostRequestBodyString1 gets the string property value. Composed type representation for type string +// returns a *string when successful +func (m *EmailsPostRequestBody) GetEmailsPostRequestBodyString1()(*string) { + return m.emailsPostRequestBodyString1 +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *EmailsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -203,9 +293,9 @@ func (m *EmailsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d func (m *EmailsPostRequestBody) GetIsComposedType()(bool) { return true } -// GetString gets the string property value. Composed type representation for type string -// returns a *string when successful -func (m *EmailsPostRequestBody) GetString()(*string) { +// GetString gets the string property value. Composed type representation for type []string +// returns a []string when successful +func (m *EmailsPostRequestBody) GetString()([]string) { return m.string } // Serialize serializes information the current object @@ -225,8 +315,18 @@ func (m *EmailsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487e if err != nil { return err } + } else if m.GetEmailsPostRequestBodyString1() != nil { + err := writer.WriteStringValue("", m.GetEmailsPostRequestBodyString1()) + if err != nil { + return err + } + } else if m.GetEmailsPostRequestBodyString0() != nil { + err := writer.WriteCollectionOfStringValues("", m.GetEmailsPostRequestBodyString0()) + if err != nil { + return err + } } else if m.GetString() != nil { - err := writer.WriteStringValue("", m.GetString()) + err := writer.WriteCollectionOfStringValues("", m.GetString()) if err != nil { return err } @@ -245,8 +345,16 @@ func (m *EmailsPostRequestBody) SetEmailsPostRequestBodyMember1(value EmailsPost func (m *EmailsPostRequestBody) SetEmailsPostRequestBodyString(value *string)() { m.emailsPostRequestBodyString = value } -// SetString sets the string property value. Composed type representation for type string -func (m *EmailsPostRequestBody) SetString(value *string)() { +// SetEmailsPostRequestBodyString0 sets the string property value. Composed type representation for type []string +func (m *EmailsPostRequestBody) SetEmailsPostRequestBodyString0(value []string)() { + m.emailsPostRequestBodyString0 = value +} +// SetEmailsPostRequestBodyString1 sets the string property value. Composed type representation for type string +func (m *EmailsPostRequestBody) SetEmailsPostRequestBodyString1(value *string)() { + m.emailsPostRequestBodyString1 = value +} +// SetString sets the string property value. Composed type representation for type []string +func (m *EmailsPostRequestBody) SetString(value []string)() { m.string = value } // EmailsRequestBuilderGetQueryParameters lists all of your email addresses, and specifies which one is visibleto the public.OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. @@ -261,22 +369,30 @@ type EmailsDeleteRequestBodyable interface { GetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1()(EmailsDeleteRequestBodyMember1able) GetEmailsDeleteRequestBodyMember1()(EmailsDeleteRequestBodyMember1able) GetEmailsDeleteRequestBodyString()(*string) - GetString()(*string) + GetEmailsDeleteRequestBodyString0()([]string) + GetEmailsDeleteRequestBodyString1()(*string) + GetString()([]string) SetEmailsDeleteRequestBodyEmailsDeleteRequestBodyMember1(value EmailsDeleteRequestBodyMember1able)() SetEmailsDeleteRequestBodyMember1(value EmailsDeleteRequestBodyMember1able)() SetEmailsDeleteRequestBodyString(value *string)() - SetString(value *string)() + SetEmailsDeleteRequestBodyString0(value []string)() + SetEmailsDeleteRequestBodyString1(value *string)() + SetString(value []string)() } type EmailsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetEmailsPostRequestBodyEmailsPostRequestBodyMember1()(EmailsPostRequestBodyMember1able) GetEmailsPostRequestBodyMember1()(EmailsPostRequestBodyMember1able) GetEmailsPostRequestBodyString()(*string) - GetString()(*string) + GetEmailsPostRequestBodyString0()([]string) + GetEmailsPostRequestBodyString1()(*string) + GetString()([]string) SetEmailsPostRequestBodyEmailsPostRequestBodyMember1(value EmailsPostRequestBodyMember1able)() SetEmailsPostRequestBodyMember1(value EmailsPostRequestBodyMember1able)() SetEmailsPostRequestBodyString(value *string)() - SetString(value *string)() + SetEmailsPostRequestBodyString0(value []string)() + SetEmailsPostRequestBodyString1(value *string)() + SetString(value []string)() } // NewEmailsRequestBuilderInternal instantiates a new EmailsRequestBuilder and sets the default values. func NewEmailsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*EmailsRequestBuilder) {