-
Notifications
You must be signed in to change notification settings - Fork 31
/
spec.go
61 lines (44 loc) · 2.04 KB
/
spec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
Copyright © 2023 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: MPL-2.0
*/
package targetlocationmodels
import (
"github.com/go-openapi/swag"
credentialsmodel "github.com/vmware/terraform-provider-tanzu-mission-control/internal/models/credential"
)
// VmwareTanzuManageV1alpha1DataprotectionProviderBackuplocationSpec The backup location spec.
//
// swagger:model vmware.tanzu.manage.v1alpha1.dataprotection.provider.backuplocation.Spec.
type VmwareTanzuManageV1alpha1DataprotectionProviderBackuplocationSpec struct {
// List of groups the backup location will be assigned to.
AssignedGroups []*VmwareTanzuManageV1alpha1DataprotectionProviderBackuplocationAssignedGroup `json:"assignedGroups"`
// The bucket to use for object storage.
Bucket string `json:"bucket,omitempty"`
// A PEM-encoded certificate bundle to trust while connecting to the storage backend. Optional.
CaCert string `json:"caCert,omitempty"`
// Provider-specific storage configuration fields.
Config *VmwareTanzuManageV1alpha1DataprotectionProviderBackuplocationTargetProviderSpecificConfig `json:"config"`
// The name of credential to be used to access the bucket.
Credential *credentialsmodel.VmwareTanzuManageV1alpha1AccountCredentialFullName `json:"credential,omitempty"`
// The region of the bucket origin. Optional.
Region string `json:"region,omitempty"`
// The target provider of the backup storage.
TargetProvider *VmwareTanzuManageV1alpha1DataprotectionProviderBackuplocationTargetProvider `json:"targetProvider,omitempty"`
}
// MarshalBinary interface implementation.
func (m *VmwareTanzuManageV1alpha1DataprotectionProviderBackuplocationSpec) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation.
func (m *VmwareTanzuManageV1alpha1DataprotectionProviderBackuplocationSpec) UnmarshalBinary(b []byte) error {
var res VmwareTanzuManageV1alpha1DataprotectionProviderBackuplocationSpec
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}