github.com/hashicorp/hcp-sdk-go@v0.94.0/clients/cloud-vault-secrets/preview/2023-11-28/models/secrets20231128_rotation_integration.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package models 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "context" 10 11 "github.com/go-openapi/errors" 12 "github.com/go-openapi/strfmt" 13 "github.com/go-openapi/swag" 14 "github.com/go-openapi/validate" 15 ) 16 17 // Secrets20231128RotationIntegration Rotation Integrations 18 // 19 // swagger:model secrets_20231128RotationIntegration 20 type Secrets20231128RotationIntegration struct { 21 22 // created at 23 // Format: date-time 24 CreatedAt strfmt.DateTime `json:"created_at,omitempty"` 25 26 // created by id 27 CreatedByID string `json:"created_by_id,omitempty"` 28 29 // integration name 30 IntegrationName string `json:"integration_name,omitempty"` 31 32 // provider 33 Provider string `json:"provider,omitempty"` 34 35 // updated at 36 // Format: date-time 37 UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` 38 39 // updated by id 40 UpdatedByID string `json:"updated_by_id,omitempty"` 41 } 42 43 // Validate validates this secrets 20231128 rotation integration 44 func (m *Secrets20231128RotationIntegration) Validate(formats strfmt.Registry) error { 45 var res []error 46 47 if err := m.validateCreatedAt(formats); err != nil { 48 res = append(res, err) 49 } 50 51 if err := m.validateUpdatedAt(formats); err != nil { 52 res = append(res, err) 53 } 54 55 if len(res) > 0 { 56 return errors.CompositeValidationError(res...) 57 } 58 return nil 59 } 60 61 func (m *Secrets20231128RotationIntegration) validateCreatedAt(formats strfmt.Registry) error { 62 if swag.IsZero(m.CreatedAt) { // not required 63 return nil 64 } 65 66 if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil { 67 return err 68 } 69 70 return nil 71 } 72 73 func (m *Secrets20231128RotationIntegration) validateUpdatedAt(formats strfmt.Registry) error { 74 if swag.IsZero(m.UpdatedAt) { // not required 75 return nil 76 } 77 78 if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { 79 return err 80 } 81 82 return nil 83 } 84 85 // ContextValidate validates this secrets 20231128 rotation integration based on context it is used 86 func (m *Secrets20231128RotationIntegration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 87 return nil 88 } 89 90 // MarshalBinary interface implementation 91 func (m *Secrets20231128RotationIntegration) MarshalBinary() ([]byte, error) { 92 if m == nil { 93 return nil, nil 94 } 95 return swag.WriteJSON(m) 96 } 97 98 // UnmarshalBinary interface implementation 99 func (m *Secrets20231128RotationIntegration) UnmarshalBinary(b []byte) error { 100 var res Secrets20231128RotationIntegration 101 if err := swag.ReadJSON(b, &res); err != nil { 102 return err 103 } 104 *m = res 105 return nil 106 }