diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/create_azure_application_password_rotating_secret_parameters.go b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/create_azure_application_password_rotating_secret_parameters.go new file mode 100644 index 00000000..eaa758bf --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/create_azure_application_password_rotating_secret_parameters.go @@ -0,0 +1,207 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package secret_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models" +) + +// NewCreateAzureApplicationPasswordRotatingSecretParams creates a new CreateAzureApplicationPasswordRotatingSecretParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCreateAzureApplicationPasswordRotatingSecretParams() *CreateAzureApplicationPasswordRotatingSecretParams { + return &CreateAzureApplicationPasswordRotatingSecretParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCreateAzureApplicationPasswordRotatingSecretParamsWithTimeout creates a new CreateAzureApplicationPasswordRotatingSecretParams object +// with the ability to set a timeout on a request. +func NewCreateAzureApplicationPasswordRotatingSecretParamsWithTimeout(timeout time.Duration) *CreateAzureApplicationPasswordRotatingSecretParams { + return &CreateAzureApplicationPasswordRotatingSecretParams{ + timeout: timeout, + } +} + +// NewCreateAzureApplicationPasswordRotatingSecretParamsWithContext creates a new CreateAzureApplicationPasswordRotatingSecretParams object +// with the ability to set a context for a request. +func NewCreateAzureApplicationPasswordRotatingSecretParamsWithContext(ctx context.Context) *CreateAzureApplicationPasswordRotatingSecretParams { + return &CreateAzureApplicationPasswordRotatingSecretParams{ + Context: ctx, + } +} + +// NewCreateAzureApplicationPasswordRotatingSecretParamsWithHTTPClient creates a new CreateAzureApplicationPasswordRotatingSecretParams object +// with the ability to set a custom HTTPClient for a request. +func NewCreateAzureApplicationPasswordRotatingSecretParamsWithHTTPClient(client *http.Client) *CreateAzureApplicationPasswordRotatingSecretParams { + return &CreateAzureApplicationPasswordRotatingSecretParams{ + HTTPClient: client, + } +} + +/* +CreateAzureApplicationPasswordRotatingSecretParams contains all the parameters to send to the API endpoint + + for the create azure application password rotating secret operation. + + Typically these are written to a http.Request. +*/ +type CreateAzureApplicationPasswordRotatingSecretParams struct { + + // AppName. + AppName string + + // Body. + Body *models.SecretServiceCreateAzureApplicationPasswordRotatingSecretBody + + // OrganizationID. + OrganizationID string + + // ProjectID. + ProjectID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the create azure application password rotating secret params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WithDefaults() *CreateAzureApplicationPasswordRotatingSecretParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the create azure application password rotating secret params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateAzureApplicationPasswordRotatingSecretParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WithTimeout(timeout time.Duration) *CreateAzureApplicationPasswordRotatingSecretParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WithContext(ctx context.Context) *CreateAzureApplicationPasswordRotatingSecretParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WithHTTPClient(client *http.Client) *CreateAzureApplicationPasswordRotatingSecretParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppName adds the appName to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WithAppName(appName string) *CreateAzureApplicationPasswordRotatingSecretParams { + o.SetAppName(appName) + return o +} + +// SetAppName adds the appName to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) SetAppName(appName string) { + o.AppName = appName +} + +// WithBody adds the body to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WithBody(body *models.SecretServiceCreateAzureApplicationPasswordRotatingSecretBody) *CreateAzureApplicationPasswordRotatingSecretParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) SetBody(body *models.SecretServiceCreateAzureApplicationPasswordRotatingSecretBody) { + o.Body = body +} + +// WithOrganizationID adds the organizationID to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WithOrganizationID(organizationID string) *CreateAzureApplicationPasswordRotatingSecretParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) SetOrganizationID(organizationID string) { + o.OrganizationID = organizationID +} + +// WithProjectID adds the projectID to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WithProjectID(projectID string) *CreateAzureApplicationPasswordRotatingSecretParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the create azure application password rotating secret params +func (o *CreateAzureApplicationPasswordRotatingSecretParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WriteToRequest writes these params to a swagger request +func (o *CreateAzureApplicationPasswordRotatingSecretParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app_name + if err := r.SetPathParam("app_name", o.AppName); err != nil { + return err + } + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param organization_id + if err := r.SetPathParam("organization_id", o.OrganizationID); err != nil { + return err + } + + // path param project_id + if err := r.SetPathParam("project_id", o.ProjectID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/create_azure_application_password_rotating_secret_responses.go b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/create_azure_application_password_rotating_secret_responses.go new file mode 100644 index 00000000..101b88e3 --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/create_azure_application_password_rotating_secret_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package secret_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models" +) + +// CreateAzureApplicationPasswordRotatingSecretReader is a Reader for the CreateAzureApplicationPasswordRotatingSecret structure. +type CreateAzureApplicationPasswordRotatingSecretReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CreateAzureApplicationPasswordRotatingSecretReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCreateAzureApplicationPasswordRotatingSecretOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCreateAzureApplicationPasswordRotatingSecretDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCreateAzureApplicationPasswordRotatingSecretOK creates a CreateAzureApplicationPasswordRotatingSecretOK with default headers values +func NewCreateAzureApplicationPasswordRotatingSecretOK() *CreateAzureApplicationPasswordRotatingSecretOK { + return &CreateAzureApplicationPasswordRotatingSecretOK{} +} + +/* +CreateAzureApplicationPasswordRotatingSecretOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type CreateAzureApplicationPasswordRotatingSecretOK struct { + Payload *models.Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse +} + +// IsSuccess returns true when this create azure application password rotating secret o k response has a 2xx status code +func (o *CreateAzureApplicationPasswordRotatingSecretOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create azure application password rotating secret o k response has a 3xx status code +func (o *CreateAzureApplicationPasswordRotatingSecretOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create azure application password rotating secret o k response has a 4xx status code +func (o *CreateAzureApplicationPasswordRotatingSecretOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this create azure application password rotating secret o k response has a 5xx status code +func (o *CreateAzureApplicationPasswordRotatingSecretOK) IsServerError() bool { + return false +} + +// IsCode returns true when this create azure application password rotating secret o k response a status code equal to that given +func (o *CreateAzureApplicationPasswordRotatingSecretOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the create azure application password rotating secret o k response +func (o *CreateAzureApplicationPasswordRotatingSecretOK) Code() int { + return 200 +} + +func (o *CreateAzureApplicationPasswordRotatingSecretOK) Error() string { + return fmt.Sprintf("[POST /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret][%d] createAzureApplicationPasswordRotatingSecretOK %+v", 200, o.Payload) +} + +func (o *CreateAzureApplicationPasswordRotatingSecretOK) String() string { + return fmt.Sprintf("[POST /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret][%d] createAzureApplicationPasswordRotatingSecretOK %+v", 200, o.Payload) +} + +func (o *CreateAzureApplicationPasswordRotatingSecretOK) GetPayload() *models.Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse { + return o.Payload +} + +func (o *CreateAzureApplicationPasswordRotatingSecretOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateAzureApplicationPasswordRotatingSecretDefault creates a CreateAzureApplicationPasswordRotatingSecretDefault with default headers values +func NewCreateAzureApplicationPasswordRotatingSecretDefault(code int) *CreateAzureApplicationPasswordRotatingSecretDefault { + return &CreateAzureApplicationPasswordRotatingSecretDefault{ + _statusCode: code, + } +} + +/* +CreateAzureApplicationPasswordRotatingSecretDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type CreateAzureApplicationPasswordRotatingSecretDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// IsSuccess returns true when this create azure application password rotating secret default response has a 2xx status code +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this create azure application password rotating secret default response has a 3xx status code +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this create azure application password rotating secret default response has a 4xx status code +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this create azure application password rotating secret default response has a 5xx status code +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this create azure application password rotating secret default response a status code equal to that given +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the create azure application password rotating secret default response +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) Code() int { + return o._statusCode +} + +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) Error() string { + return fmt.Sprintf("[POST /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret][%d] CreateAzureApplicationPasswordRotatingSecret default %+v", o._statusCode, o.Payload) +} + +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) String() string { + return fmt.Sprintf("[POST /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret][%d] CreateAzureApplicationPasswordRotatingSecret default %+v", o._statusCode, o.Payload) +} + +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *CreateAzureApplicationPasswordRotatingSecretDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/get_azure_application_password_rotating_secret_config_parameters.go b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/get_azure_application_password_rotating_secret_config_parameters.go new file mode 100644 index 00000000..ace86b70 --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/get_azure_application_password_rotating_secret_config_parameters.go @@ -0,0 +1,205 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package secret_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetAzureApplicationPasswordRotatingSecretConfigParams creates a new GetAzureApplicationPasswordRotatingSecretConfigParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetAzureApplicationPasswordRotatingSecretConfigParams() *GetAzureApplicationPasswordRotatingSecretConfigParams { + return &GetAzureApplicationPasswordRotatingSecretConfigParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetAzureApplicationPasswordRotatingSecretConfigParamsWithTimeout creates a new GetAzureApplicationPasswordRotatingSecretConfigParams object +// with the ability to set a timeout on a request. +func NewGetAzureApplicationPasswordRotatingSecretConfigParamsWithTimeout(timeout time.Duration) *GetAzureApplicationPasswordRotatingSecretConfigParams { + return &GetAzureApplicationPasswordRotatingSecretConfigParams{ + timeout: timeout, + } +} + +// NewGetAzureApplicationPasswordRotatingSecretConfigParamsWithContext creates a new GetAzureApplicationPasswordRotatingSecretConfigParams object +// with the ability to set a context for a request. +func NewGetAzureApplicationPasswordRotatingSecretConfigParamsWithContext(ctx context.Context) *GetAzureApplicationPasswordRotatingSecretConfigParams { + return &GetAzureApplicationPasswordRotatingSecretConfigParams{ + Context: ctx, + } +} + +// NewGetAzureApplicationPasswordRotatingSecretConfigParamsWithHTTPClient creates a new GetAzureApplicationPasswordRotatingSecretConfigParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetAzureApplicationPasswordRotatingSecretConfigParamsWithHTTPClient(client *http.Client) *GetAzureApplicationPasswordRotatingSecretConfigParams { + return &GetAzureApplicationPasswordRotatingSecretConfigParams{ + HTTPClient: client, + } +} + +/* +GetAzureApplicationPasswordRotatingSecretConfigParams contains all the parameters to send to the API endpoint + + for the get azure application password rotating secret config operation. + + Typically these are written to a http.Request. +*/ +type GetAzureApplicationPasswordRotatingSecretConfigParams struct { + + // AppName. + AppName string + + // Name. + Name string + + // OrganizationID. + OrganizationID string + + // ProjectID. + ProjectID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get azure application password rotating secret config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WithDefaults() *GetAzureApplicationPasswordRotatingSecretConfigParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get azure application password rotating secret config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WithTimeout(timeout time.Duration) *GetAzureApplicationPasswordRotatingSecretConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WithContext(ctx context.Context) *GetAzureApplicationPasswordRotatingSecretConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WithHTTPClient(client *http.Client) *GetAzureApplicationPasswordRotatingSecretConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppName adds the appName to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WithAppName(appName string) *GetAzureApplicationPasswordRotatingSecretConfigParams { + o.SetAppName(appName) + return o +} + +// SetAppName adds the appName to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) SetAppName(appName string) { + o.AppName = appName +} + +// WithName adds the name to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WithName(name string) *GetAzureApplicationPasswordRotatingSecretConfigParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) SetName(name string) { + o.Name = name +} + +// WithOrganizationID adds the organizationID to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WithOrganizationID(organizationID string) *GetAzureApplicationPasswordRotatingSecretConfigParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) SetOrganizationID(organizationID string) { + o.OrganizationID = organizationID +} + +// WithProjectID adds the projectID to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WithProjectID(projectID string) *GetAzureApplicationPasswordRotatingSecretConfigParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the get azure application password rotating secret config params +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAzureApplicationPasswordRotatingSecretConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app_name + if err := r.SetPathParam("app_name", o.AppName); err != nil { + return err + } + + // path param name + if err := r.SetPathParam("name", o.Name); err != nil { + return err + } + + // path param organization_id + if err := r.SetPathParam("organization_id", o.OrganizationID); err != nil { + return err + } + + // path param project_id + if err := r.SetPathParam("project_id", o.ProjectID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/get_azure_application_password_rotating_secret_config_responses.go b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/get_azure_application_password_rotating_secret_config_responses.go new file mode 100644 index 00000000..6dc87867 --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/get_azure_application_password_rotating_secret_config_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package secret_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models" +) + +// GetAzureApplicationPasswordRotatingSecretConfigReader is a Reader for the GetAzureApplicationPasswordRotatingSecretConfig structure. +type GetAzureApplicationPasswordRotatingSecretConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAzureApplicationPasswordRotatingSecretConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAzureApplicationPasswordRotatingSecretConfigOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGetAzureApplicationPasswordRotatingSecretConfigDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGetAzureApplicationPasswordRotatingSecretConfigOK creates a GetAzureApplicationPasswordRotatingSecretConfigOK with default headers values +func NewGetAzureApplicationPasswordRotatingSecretConfigOK() *GetAzureApplicationPasswordRotatingSecretConfigOK { + return &GetAzureApplicationPasswordRotatingSecretConfigOK{} +} + +/* +GetAzureApplicationPasswordRotatingSecretConfigOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type GetAzureApplicationPasswordRotatingSecretConfigOK struct { + Payload *models.Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse +} + +// IsSuccess returns true when this get azure application password rotating secret config o k response has a 2xx status code +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get azure application password rotating secret config o k response has a 3xx status code +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get azure application password rotating secret config o k response has a 4xx status code +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get azure application password rotating secret config o k response has a 5xx status code +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get azure application password rotating secret config o k response a status code equal to that given +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get azure application password rotating secret config o k response +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) Code() int { + return 200 +} + +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) Error() string { + return fmt.Sprintf("[GET /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}][%d] getAzureApplicationPasswordRotatingSecretConfigOK %+v", 200, o.Payload) +} + +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) String() string { + return fmt.Sprintf("[GET /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}][%d] getAzureApplicationPasswordRotatingSecretConfigOK %+v", 200, o.Payload) +} + +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) GetPayload() *models.Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse { + return o.Payload +} + +func (o *GetAzureApplicationPasswordRotatingSecretConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAzureApplicationPasswordRotatingSecretConfigDefault creates a GetAzureApplicationPasswordRotatingSecretConfigDefault with default headers values +func NewGetAzureApplicationPasswordRotatingSecretConfigDefault(code int) *GetAzureApplicationPasswordRotatingSecretConfigDefault { + return &GetAzureApplicationPasswordRotatingSecretConfigDefault{ + _statusCode: code, + } +} + +/* +GetAzureApplicationPasswordRotatingSecretConfigDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type GetAzureApplicationPasswordRotatingSecretConfigDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// IsSuccess returns true when this get azure application password rotating secret config default response has a 2xx status code +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this get azure application password rotating secret config default response has a 3xx status code +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this get azure application password rotating secret config default response has a 4xx status code +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this get azure application password rotating secret config default response has a 5xx status code +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this get azure application password rotating secret config default response a status code equal to that given +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the get azure application password rotating secret config default response +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) Code() int { + return o._statusCode +} + +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) Error() string { + return fmt.Sprintf("[GET /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}][%d] GetAzureApplicationPasswordRotatingSecretConfig default %+v", o._statusCode, o.Payload) +} + +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) String() string { + return fmt.Sprintf("[GET /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}][%d] GetAzureApplicationPasswordRotatingSecretConfig default %+v", o._statusCode, o.Payload) +} + +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *GetAzureApplicationPasswordRotatingSecretConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/secret_service_client.go b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/secret_service_client.go index 1307db0c..ad7dca2c 100644 --- a/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/secret_service_client.go +++ b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/secret_service_client.go @@ -38,6 +38,8 @@ type ClientService interface { CreateAwsIntegration(params *CreateAwsIntegrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAwsIntegrationOK, error) + CreateAzureApplicationPasswordRotatingSecret(params *CreateAzureApplicationPasswordRotatingSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAzureApplicationPasswordRotatingSecretOK, error) + CreateAzureIntegration(params *CreateAzureIntegrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAzureIntegrationOK, error) CreateConfluentCloudAPIKeyRotatingSecret(params *CreateConfluentCloudAPIKeyRotatingSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateConfluentCloudAPIKeyRotatingSecretOK, error) @@ -112,6 +114,8 @@ type ClientService interface { GetAwsIntegration(params *GetAwsIntegrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAwsIntegrationOK, error) + GetAzureApplicationPasswordRotatingSecretConfig(params *GetAzureApplicationPasswordRotatingSecretConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAzureApplicationPasswordRotatingSecretConfigOK, error) + GetAzureIntegration(params *GetAzureIntegrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAzureIntegrationOK, error) GetConfluentCloudAPIKeyRotatingSecretConfig(params *GetConfluentCloudAPIKeyRotatingSecretConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetConfluentCloudAPIKeyRotatingSecretConfigOK, error) @@ -208,6 +212,8 @@ type ClientService interface { UpdateAwsIntegration(params *UpdateAwsIntegrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAwsIntegrationOK, error) + UpdateAzureApplicationPasswordRotatingSecret(params *UpdateAzureApplicationPasswordRotatingSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAzureApplicationPasswordRotatingSecretOK, error) + UpdateAzureIntegration(params *UpdateAzureIntegrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAzureIntegrationOK, error) UpdateConfluentCloudAPIKeyRotatingSecret(params *UpdateConfluentCloudAPIKeyRotatingSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateConfluentCloudAPIKeyRotatingSecretOK, error) @@ -429,6 +435,44 @@ func (a *Client) CreateAwsIntegration(params *CreateAwsIntegrationParams, authIn return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +CreateAzureApplicationPasswordRotatingSecret create azure application password rotating secret API +*/ +func (a *Client) CreateAzureApplicationPasswordRotatingSecret(params *CreateAzureApplicationPasswordRotatingSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAzureApplicationPasswordRotatingSecretOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCreateAzureApplicationPasswordRotatingSecretParams() + } + op := &runtime.ClientOperation{ + ID: "CreateAzureApplicationPasswordRotatingSecret", + Method: "POST", + PathPattern: "/secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CreateAzureApplicationPasswordRotatingSecretReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CreateAzureApplicationPasswordRotatingSecretOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CreateAzureApplicationPasswordRotatingSecretDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* CreateAzureIntegration create azure integration API */ @@ -1835,6 +1879,44 @@ func (a *Client) GetAwsIntegration(params *GetAwsIntegrationParams, authInfo run return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +GetAzureApplicationPasswordRotatingSecretConfig get azure application password rotating secret config API +*/ +func (a *Client) GetAzureApplicationPasswordRotatingSecretConfig(params *GetAzureApplicationPasswordRotatingSecretConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAzureApplicationPasswordRotatingSecretConfigOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAzureApplicationPasswordRotatingSecretConfigParams() + } + op := &runtime.ClientOperation{ + ID: "GetAzureApplicationPasswordRotatingSecretConfig", + Method: "GET", + PathPattern: "/secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetAzureApplicationPasswordRotatingSecretConfigReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetAzureApplicationPasswordRotatingSecretConfigOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*GetAzureApplicationPasswordRotatingSecretConfigDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* GetAzureIntegration get azure integration API */ @@ -3659,6 +3741,44 @@ func (a *Client) UpdateAwsIntegration(params *UpdateAwsIntegrationParams, authIn return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +UpdateAzureApplicationPasswordRotatingSecret update azure application password rotating secret API +*/ +func (a *Client) UpdateAzureApplicationPasswordRotatingSecret(params *UpdateAzureApplicationPasswordRotatingSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAzureApplicationPasswordRotatingSecretOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateAzureApplicationPasswordRotatingSecretParams() + } + op := &runtime.ClientOperation{ + ID: "UpdateAzureApplicationPasswordRotatingSecret", + Method: "PUT", + PathPattern: "/secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UpdateAzureApplicationPasswordRotatingSecretReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateAzureApplicationPasswordRotatingSecretOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*UpdateAzureApplicationPasswordRotatingSecretDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* UpdateAzureIntegration update azure integration API */ diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/update_azure_application_password_rotating_secret_parameters.go b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/update_azure_application_password_rotating_secret_parameters.go new file mode 100644 index 00000000..9c430082 --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/update_azure_application_password_rotating_secret_parameters.go @@ -0,0 +1,226 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package secret_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models" +) + +// NewUpdateAzureApplicationPasswordRotatingSecretParams creates a new UpdateAzureApplicationPasswordRotatingSecretParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUpdateAzureApplicationPasswordRotatingSecretParams() *UpdateAzureApplicationPasswordRotatingSecretParams { + return &UpdateAzureApplicationPasswordRotatingSecretParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateAzureApplicationPasswordRotatingSecretParamsWithTimeout creates a new UpdateAzureApplicationPasswordRotatingSecretParams object +// with the ability to set a timeout on a request. +func NewUpdateAzureApplicationPasswordRotatingSecretParamsWithTimeout(timeout time.Duration) *UpdateAzureApplicationPasswordRotatingSecretParams { + return &UpdateAzureApplicationPasswordRotatingSecretParams{ + timeout: timeout, + } +} + +// NewUpdateAzureApplicationPasswordRotatingSecretParamsWithContext creates a new UpdateAzureApplicationPasswordRotatingSecretParams object +// with the ability to set a context for a request. +func NewUpdateAzureApplicationPasswordRotatingSecretParamsWithContext(ctx context.Context) *UpdateAzureApplicationPasswordRotatingSecretParams { + return &UpdateAzureApplicationPasswordRotatingSecretParams{ + Context: ctx, + } +} + +// NewUpdateAzureApplicationPasswordRotatingSecretParamsWithHTTPClient creates a new UpdateAzureApplicationPasswordRotatingSecretParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateAzureApplicationPasswordRotatingSecretParamsWithHTTPClient(client *http.Client) *UpdateAzureApplicationPasswordRotatingSecretParams { + return &UpdateAzureApplicationPasswordRotatingSecretParams{ + HTTPClient: client, + } +} + +/* +UpdateAzureApplicationPasswordRotatingSecretParams contains all the parameters to send to the API endpoint + + for the update azure application password rotating secret operation. + + Typically these are written to a http.Request. +*/ +type UpdateAzureApplicationPasswordRotatingSecretParams struct { + + // AppName. + AppName string + + // Body. + Body *models.SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody + + // Name. + Name string + + // OrganizationID. + OrganizationID string + + // ProjectID. + ProjectID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update azure application password rotating secret params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithDefaults() *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update azure application password rotating secret params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithTimeout(timeout time.Duration) *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithContext(ctx context.Context) *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithHTTPClient(client *http.Client) *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppName adds the appName to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithAppName(appName string) *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetAppName(appName) + return o +} + +// SetAppName adds the appName to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetAppName(appName string) { + o.AppName = appName +} + +// WithBody adds the body to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithBody(body *models.SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody) *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetBody(body *models.SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody) { + o.Body = body +} + +// WithName adds the name to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithName(name string) *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetName(name) + return o +} + +// SetName adds the name to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetName(name string) { + o.Name = name +} + +// WithOrganizationID adds the organizationID to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithOrganizationID(organizationID string) *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetOrganizationID(organizationID string) { + o.OrganizationID = organizationID +} + +// WithProjectID adds the projectID to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WithProjectID(projectID string) *UpdateAzureApplicationPasswordRotatingSecretParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the update azure application password rotating secret params +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateAzureApplicationPasswordRotatingSecretParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param app_name + if err := r.SetPathParam("app_name", o.AppName); err != nil { + return err + } + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param name + if err := r.SetPathParam("name", o.Name); err != nil { + return err + } + + // path param organization_id + if err := r.SetPathParam("organization_id", o.OrganizationID); err != nil { + return err + } + + // path param project_id + if err := r.SetPathParam("project_id", o.ProjectID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/update_azure_application_password_rotating_secret_responses.go b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/update_azure_application_password_rotating_secret_responses.go new file mode 100644 index 00000000..3b9f0eff --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/client/secret_service/update_azure_application_password_rotating_secret_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package secret_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/hashicorp/hcp-sdk-go/clients/cloud-vault-secrets/stable/2023-11-28/models" +) + +// UpdateAzureApplicationPasswordRotatingSecretReader is a Reader for the UpdateAzureApplicationPasswordRotatingSecret structure. +type UpdateAzureApplicationPasswordRotatingSecretReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateAzureApplicationPasswordRotatingSecretReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateAzureApplicationPasswordRotatingSecretOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewUpdateAzureApplicationPasswordRotatingSecretDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewUpdateAzureApplicationPasswordRotatingSecretOK creates a UpdateAzureApplicationPasswordRotatingSecretOK with default headers values +func NewUpdateAzureApplicationPasswordRotatingSecretOK() *UpdateAzureApplicationPasswordRotatingSecretOK { + return &UpdateAzureApplicationPasswordRotatingSecretOK{} +} + +/* +UpdateAzureApplicationPasswordRotatingSecretOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type UpdateAzureApplicationPasswordRotatingSecretOK struct { + Payload *models.Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse +} + +// IsSuccess returns true when this update azure application password rotating secret o k response has a 2xx status code +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update azure application password rotating secret o k response has a 3xx status code +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update azure application password rotating secret o k response has a 4xx status code +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update azure application password rotating secret o k response has a 5xx status code +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update azure application password rotating secret o k response a status code equal to that given +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update azure application password rotating secret o k response +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) Code() int { + return 200 +} + +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) Error() string { + return fmt.Sprintf("[PUT /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}][%d] updateAzureApplicationPasswordRotatingSecretOK %+v", 200, o.Payload) +} + +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) String() string { + return fmt.Sprintf("[PUT /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}][%d] updateAzureApplicationPasswordRotatingSecretOK %+v", 200, o.Payload) +} + +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) GetPayload() *models.Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse { + return o.Payload +} + +func (o *UpdateAzureApplicationPasswordRotatingSecretOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateAzureApplicationPasswordRotatingSecretDefault creates a UpdateAzureApplicationPasswordRotatingSecretDefault with default headers values +func NewUpdateAzureApplicationPasswordRotatingSecretDefault(code int) *UpdateAzureApplicationPasswordRotatingSecretDefault { + return &UpdateAzureApplicationPasswordRotatingSecretDefault{ + _statusCode: code, + } +} + +/* +UpdateAzureApplicationPasswordRotatingSecretDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type UpdateAzureApplicationPasswordRotatingSecretDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// IsSuccess returns true when this update azure application password rotating secret default response has a 2xx status code +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this update azure application password rotating secret default response has a 3xx status code +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this update azure application password rotating secret default response has a 4xx status code +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this update azure application password rotating secret default response has a 5xx status code +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this update azure application password rotating secret default response a status code equal to that given +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the update azure application password rotating secret default response +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) Code() int { + return o._statusCode +} + +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) Error() string { + return fmt.Sprintf("[PUT /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}][%d] UpdateAzureApplicationPasswordRotatingSecret default %+v", o._statusCode, o.Payload) +} + +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) String() string { + return fmt.Sprintf("[PUT /secrets/2023-11-28/organizations/{organization_id}/projects/{project_id}/apps/{app_name}/rotating/azure/secret/{name}][%d] UpdateAzureApplicationPasswordRotatingSecret default %+v", o._statusCode, o.Payload) +} + +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *UpdateAzureApplicationPasswordRotatingSecretDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/models/secret_service_create_azure_application_password_rotating_secret_body.go b/clients/cloud-vault-secrets/stable/2023-11-28/models/secret_service_create_azure_application_password_rotating_secret_body.go new file mode 100644 index 00000000..e277b43e --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/models/secret_service_create_azure_application_password_rotating_secret_body.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SecretServiceCreateAzureApplicationPasswordRotatingSecretBody --- Azure Rotating Secrets --- +// +// swagger:model SecretServiceCreateAzureApplicationPasswordRotatingSecretBody +type SecretServiceCreateAzureApplicationPasswordRotatingSecretBody struct { + + // azure application password params + AzureApplicationPasswordParams *Secrets20231128AzureApplicationPasswordParams `json:"azure_application_password_params,omitempty"` + + // integration name + IntegrationName string `json:"integration_name,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // rotation policy name + RotationPolicyName string `json:"rotation_policy_name,omitempty"` +} + +// Validate validates this secret service create azure application password rotating secret body +func (m *SecretServiceCreateAzureApplicationPasswordRotatingSecretBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAzureApplicationPasswordParams(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SecretServiceCreateAzureApplicationPasswordRotatingSecretBody) validateAzureApplicationPasswordParams(formats strfmt.Registry) error { + if swag.IsZero(m.AzureApplicationPasswordParams) { // not required + return nil + } + + if m.AzureApplicationPasswordParams != nil { + if err := m.AzureApplicationPasswordParams.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azure_application_password_params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azure_application_password_params") + } + return err + } + } + + return nil +} + +// ContextValidate validate this secret service create azure application password rotating secret body based on the context it is used +func (m *SecretServiceCreateAzureApplicationPasswordRotatingSecretBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAzureApplicationPasswordParams(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SecretServiceCreateAzureApplicationPasswordRotatingSecretBody) contextValidateAzureApplicationPasswordParams(ctx context.Context, formats strfmt.Registry) error { + + if m.AzureApplicationPasswordParams != nil { + + if swag.IsZero(m.AzureApplicationPasswordParams) { // not required + return nil + } + + if err := m.AzureApplicationPasswordParams.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azure_application_password_params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azure_application_password_params") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SecretServiceCreateAzureApplicationPasswordRotatingSecretBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SecretServiceCreateAzureApplicationPasswordRotatingSecretBody) UnmarshalBinary(b []byte) error { + var res SecretServiceCreateAzureApplicationPasswordRotatingSecretBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/models/secret_service_update_azure_application_password_rotating_secret_body.go b/clients/cloud-vault-secrets/stable/2023-11-28/models/secret_service_update_azure_application_password_rotating_secret_body.go new file mode 100644 index 00000000..1f3165bf --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/models/secret_service_update_azure_application_password_rotating_secret_body.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody secret service update azure application password rotating secret body +// +// swagger:model SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody +type SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody struct { + + // azure application password params + AzureApplicationPasswordParams *Secrets20231128AzureApplicationPasswordParams `json:"azure_application_password_params,omitempty"` + + // rotate on update + RotateOnUpdate bool `json:"rotate_on_update,omitempty"` + + // rotation policy name + RotationPolicyName string `json:"rotation_policy_name,omitempty"` +} + +// Validate validates this secret service update azure application password rotating secret body +func (m *SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAzureApplicationPasswordParams(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody) validateAzureApplicationPasswordParams(formats strfmt.Registry) error { + if swag.IsZero(m.AzureApplicationPasswordParams) { // not required + return nil + } + + if m.AzureApplicationPasswordParams != nil { + if err := m.AzureApplicationPasswordParams.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azure_application_password_params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azure_application_password_params") + } + return err + } + } + + return nil +} + +// ContextValidate validate this secret service update azure application password rotating secret body based on the context it is used +func (m *SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAzureApplicationPasswordParams(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody) contextValidateAzureApplicationPasswordParams(ctx context.Context, formats strfmt.Registry) error { + + if m.AzureApplicationPasswordParams != nil { + + if swag.IsZero(m.AzureApplicationPasswordParams) { // not required + return nil + } + + if err := m.AzureApplicationPasswordParams.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azure_application_password_params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azure_application_password_params") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody) UnmarshalBinary(b []byte) error { + var res SecretServiceUpdateAzureApplicationPasswordRotatingSecretBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_azure_application_password_params.go b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_azure_application_password_params.go new file mode 100644 index 00000000..89e84d2c --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_azure_application_password_params.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Secrets20231128AzureApplicationPasswordParams secrets 20231128 azure application password params +// +// swagger:model secrets_20231128AzureApplicationPasswordParams +type Secrets20231128AzureApplicationPasswordParams struct { + + // app client id + AppClientID string `json:"app_client_id,omitempty"` + + // app object id + AppObjectID string `json:"app_object_id,omitempty"` +} + +// Validate validates this secrets 20231128 azure application password params +func (m *Secrets20231128AzureApplicationPasswordParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this secrets 20231128 azure application password params based on context it is used +func (m *Secrets20231128AzureApplicationPasswordParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Secrets20231128AzureApplicationPasswordParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Secrets20231128AzureApplicationPasswordParams) UnmarshalBinary(b []byte) error { + var res Secrets20231128AzureApplicationPasswordParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_azure_application_password_rotating_secret_config.go b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_azure_application_password_rotating_secret_config.go new file mode 100644 index 00000000..d77a1e5a --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_azure_application_password_rotating_secret_config.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Secrets20231128AzureApplicationPasswordRotatingSecretConfig secrets 20231128 azure application password rotating secret config +// +// swagger:model secrets_20231128AzureApplicationPasswordRotatingSecretConfig +type Secrets20231128AzureApplicationPasswordRotatingSecretConfig struct { + + // app name + AppName string `json:"app_name,omitempty"` + + // azure application password params + AzureApplicationPasswordParams *Secrets20231128AzureApplicationPasswordParams `json:"azure_application_password_params,omitempty"` + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at,omitempty"` + + // created by id + CreatedByID string `json:"created_by_id,omitempty"` + + // integration name + IntegrationName string `json:"integration_name,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // rotation policy name + RotationPolicyName string `json:"rotation_policy_name,omitempty"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` + + // updated by id + UpdatedByID string `json:"updated_by_id,omitempty"` +} + +// Validate validates this secrets 20231128 azure application password rotating secret config +func (m *Secrets20231128AzureApplicationPasswordRotatingSecretConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAzureApplicationPasswordParams(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Secrets20231128AzureApplicationPasswordRotatingSecretConfig) validateAzureApplicationPasswordParams(formats strfmt.Registry) error { + if swag.IsZero(m.AzureApplicationPasswordParams) { // not required + return nil + } + + if m.AzureApplicationPasswordParams != nil { + if err := m.AzureApplicationPasswordParams.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azure_application_password_params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azure_application_password_params") + } + return err + } + } + + return nil +} + +func (m *Secrets20231128AzureApplicationPasswordRotatingSecretConfig) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Secrets20231128AzureApplicationPasswordRotatingSecretConfig) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this secrets 20231128 azure application password rotating secret config based on the context it is used +func (m *Secrets20231128AzureApplicationPasswordRotatingSecretConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAzureApplicationPasswordParams(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Secrets20231128AzureApplicationPasswordRotatingSecretConfig) contextValidateAzureApplicationPasswordParams(ctx context.Context, formats strfmt.Registry) error { + + if m.AzureApplicationPasswordParams != nil { + + if swag.IsZero(m.AzureApplicationPasswordParams) { // not required + return nil + } + + if err := m.AzureApplicationPasswordParams.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azure_application_password_params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azure_application_password_params") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Secrets20231128AzureApplicationPasswordRotatingSecretConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Secrets20231128AzureApplicationPasswordRotatingSecretConfig) UnmarshalBinary(b []byte) error { + var res Secrets20231128AzureApplicationPasswordRotatingSecretConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_create_azure_application_password_rotating_secret_response.go b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_create_azure_application_password_rotating_secret_response.go new file mode 100644 index 00000000..890dc071 --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_create_azure_application_password_rotating_secret_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse secrets 20231128 create azure application password rotating secret response +// +// swagger:model secrets_20231128CreateAzureApplicationPasswordRotatingSecretResponse +type Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse struct { + + // config + Config *Secrets20231128AzureApplicationPasswordRotatingSecretConfig `json:"config,omitempty"` +} + +// Validate validates this secrets 20231128 create azure application password rotating secret response +func (m *Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse) validateConfig(formats strfmt.Registry) error { + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("config") + } + return err + } + } + + return nil +} + +// ContextValidate validate this secrets 20231128 create azure application password rotating secret response based on the context it is used +func (m *Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.Config != nil { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if err := m.Config.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse) UnmarshalBinary(b []byte) error { + var res Secrets20231128CreateAzureApplicationPasswordRotatingSecretResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_create_gateway_pool_response.go b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_create_gateway_pool_response.go index c57f5e74..42d780c3 100644 --- a/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_create_gateway_pool_response.go +++ b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_create_gateway_pool_response.go @@ -18,9 +18,6 @@ import ( // swagger:model secrets_20231128CreateGatewayPoolResponse type Secrets20231128CreateGatewayPoolResponse struct { - // cert pem - CertPem string `json:"cert_pem,omitempty"` - // client_id is the oauth client_id for the gateway service principal ClientID string `json:"client_id,omitempty"` diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_get_azure_application_password_rotating_secret_config_response.go b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_get_azure_application_password_rotating_secret_config_response.go new file mode 100644 index 00000000..2a7cb7f6 --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_get_azure_application_password_rotating_secret_config_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse secrets 20231128 get azure application password rotating secret config response +// +// swagger:model secrets_20231128GetAzureApplicationPasswordRotatingSecretConfigResponse +type Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse struct { + + // config + Config *Secrets20231128AzureApplicationPasswordRotatingSecretConfig `json:"config,omitempty"` +} + +// Validate validates this secrets 20231128 get azure application password rotating secret config response +func (m *Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse) validateConfig(formats strfmt.Registry) error { + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("config") + } + return err + } + } + + return nil +} + +// ContextValidate validate this secrets 20231128 get azure application password rotating secret config response based on the context it is used +func (m *Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.Config != nil { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if err := m.Config.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse) UnmarshalBinary(b []byte) error { + var res Secrets20231128GetAzureApplicationPasswordRotatingSecretConfigResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_update_azure_application_password_rotating_secret_response.go b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_update_azure_application_password_rotating_secret_response.go new file mode 100644 index 00000000..9a25ff56 --- /dev/null +++ b/clients/cloud-vault-secrets/stable/2023-11-28/models/secrets20231128_update_azure_application_password_rotating_secret_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse secrets 20231128 update azure application password rotating secret response +// +// swagger:model secrets_20231128UpdateAzureApplicationPasswordRotatingSecretResponse +type Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse struct { + + // config + Config *Secrets20231128AzureApplicationPasswordRotatingSecretConfig `json:"config,omitempty"` +} + +// Validate validates this secrets 20231128 update azure application password rotating secret response +func (m *Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse) validateConfig(formats strfmt.Registry) error { + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("config") + } + return err + } + } + + return nil +} + +// ContextValidate validate this secrets 20231128 update azure application password rotating secret response based on the context it is used +func (m *Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.Config != nil { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if err := m.Config.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse) UnmarshalBinary(b []byte) error { + var res Secrets20231128UpdateAzureApplicationPasswordRotatingSecretResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +}