diff --git a/go/models/build_log_msg.go b/go/models/build_log_msg.go index 4d3dad7d..cdb5c078 100644 --- a/go/models/build_log_msg.go +++ b/go/models/build_log_msg.go @@ -6,8 +6,12 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" + + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // BuildLogMsg build log msg @@ -20,10 +24,75 @@ type BuildLogMsg struct { // message Message string `json:"message,omitempty"` + + // section + // Enum: [initializing building deploying cleanup postprocessing] + Section string `json:"section,omitempty"` } // Validate validates this build log msg func (m *BuildLogMsg) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSection(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var buildLogMsgTypeSectionPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["initializing","building","deploying","cleanup","postprocessing"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + buildLogMsgTypeSectionPropEnum = append(buildLogMsgTypeSectionPropEnum, v) + } +} + +const ( + + // BuildLogMsgSectionInitializing captures enum value "initializing" + BuildLogMsgSectionInitializing string = "initializing" + + // BuildLogMsgSectionBuilding captures enum value "building" + BuildLogMsgSectionBuilding string = "building" + + // BuildLogMsgSectionDeploying captures enum value "deploying" + BuildLogMsgSectionDeploying string = "deploying" + + // BuildLogMsgSectionCleanup captures enum value "cleanup" + BuildLogMsgSectionCleanup string = "cleanup" + + // BuildLogMsgSectionPostprocessing captures enum value "postprocessing" + BuildLogMsgSectionPostprocessing string = "postprocessing" +) + +// prop value enum +func (m *BuildLogMsg) validateSectionEnum(path, location string, value string) error { + if err := validate.Enum(path, location, value, buildLogMsgTypeSectionPropEnum); err != nil { + return err + } + return nil +} + +func (m *BuildLogMsg) validateSection(formats strfmt.Registry) error { + + if swag.IsZero(m.Section) { // not required + return nil + } + + // value enum + if err := m.validateSectionEnum("section", "body", m.Section); err != nil { + return err + } + return nil } diff --git a/go/plumbing/operations/operations_client.go b/go/plumbing/operations/operations_client.go index 32761787..73ff2ea6 100644 --- a/go/plumbing/operations/operations_client.go +++ b/go/plumbing/operations/operations_client.go @@ -533,7 +533,7 @@ func (a *Client) CreateDNSZone(params *CreateDNSZoneParams, authInfo runtime.Cli } /* - CreateEnvVars Creates new environment variables. Granular scopes are available on Pro plans and above. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. + CreateEnvVars Creates new environment variables. Granular scopes are available on Pro plans and above. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. */ func (a *Client) CreateEnvVars(params *CreateEnvVarsParams, authInfo runtime.ClientAuthInfoWriter) (*CreateEnvVarsCreated, error) { // TODO: Validate the params before sending @@ -1077,7 +1077,7 @@ func (a *Client) DeleteDNSZone(params *DeleteDNSZoneParams, authInfo runtime.Cli } /* - DeleteEnvVar Deletes an environment variable. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI + DeleteEnvVar Deletes an environment variable. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. */ func (a *Client) DeleteEnvVar(params *DeleteEnvVarParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteEnvVarNoContent, error) { // TODO: Validate the params before sending diff --git a/swagger.yml b/swagger.yml index 76c1500d..ccccf750 100644 --- a/swagger.yml +++ b/swagger.yml @@ -225,7 +225,7 @@ paths: $ref: '#/responses/error' description: >- Returns all environment variables for an account or site. An - account corresponds to a team in the Netlify UI. To use this endpoint, your + account corresponds to a team in the Netlify UI. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. post: tags: @@ -233,7 +233,7 @@ paths: operationId: createEnvVars description: >- Creates new environment variables. Granular scopes are available - on Pro plans and above. To use this endpoint, your site must no longer be + on Pro plans and above. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. parameters: - in: body @@ -315,7 +315,7 @@ paths: default: $ref: '#/responses/error' description: >- - Returns an individual environment variable. To use this endpoint, your site + Returns an individual environment variable. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. put: tags: @@ -323,7 +323,7 @@ paths: operationId: updateEnvVar description: >- Updates an existing environment variable and all of its values. - Existing values will be replaced by values provided. To use this endpoint, your site must + Existing values will be replaced by values provided. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. parameters: - name: account_id @@ -378,7 +378,7 @@ paths: - environmentVariables operationId: setEnvVarValue description: >- - Updates or creates a new value for an existing environment variable. To use this endpoint, your site + Updates or creates a new value for an existing environment variable. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. parameters: - name: account_id @@ -445,7 +445,7 @@ paths: default: $ref: '#/responses/error' description: >- - Deletes an environment variable. To use this endpoint, your site must no + Deletes an environment variable. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. /accounts/{account_id}/env/{key}/value/{id}: delete: @@ -481,7 +481,7 @@ paths: default: $ref: '#/responses/error' description: >- - Deletes a specific environment variable value. To use this endpoint, your site + Deletes a specific environment variable value. To use this endpoint, your site must no longer be using the classic environment variables experience. Migrate now with the Netlify UI. /sites/{site_id}/forms: get: @@ -2891,6 +2891,14 @@ definitions: type: string error: type: boolean + section: + type: string + enum: + - initializing + - building + - deploying + - cleanup + - postprocessing pluginRunData: type: object properties: