github.com/sacloud/iaas-api-go@v1.12.0/naked/auto_backup.go (about) 1 // Copyright 2022-2023 The sacloud/iaas-api-go Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package naked 16 17 import ( 18 "time" 19 20 "github.com/sacloud/iaas-api-go/types" 21 ) 22 23 // AutoBackup 自動バックアップ 24 type AutoBackup struct { 25 ID types.ID `json:",omitempty" yaml:"id,omitempty" structs:",omitempty"` 26 Name string `json:",omitempty" yaml:"name,omitempty" structs:",omitempty"` 27 Description string `yaml:"description"` 28 Tags types.Tags `yaml:"tags"` 29 Icon *Icon `json:",omitempty" yaml:"icon,omitempty" structs:",omitempty"` 30 CreatedAt *time.Time `json:",omitempty" yaml:"created_at,omitempty" structs:",omitempty"` 31 ModifiedAt *time.Time `json:",omitempty" yaml:"modified_at,omitempty" structs:",omitempty"` 32 Availability types.EAvailability `json:",omitempty" yaml:"availability,omitempty" structs:",omitempty"` 33 ServiceClass string `json:",omitempty" yaml:"service_class,omitempty" structs:",omitempty"` 34 Provider *Provider `json:",omitempty" yaml:"provider,omitempty" structs:",omitempty"` 35 Settings *AutoBackupSettings `json:",omitempty" yaml:"settings,omitempty" structs:",omitempty"` 36 SettingsHash string `json:",omitempty" yaml:"setting_hash,omitempty" structs:",omitempty"` 37 Status *AutoBackupStatus `json:",omitempty" yaml:"status,omitempty" structs:",omitempty"` 38 } 39 40 // AutoBackupSettingsUpdate 自動バックアップ 41 type AutoBackupSettingsUpdate struct { 42 Settings *AutoBackupSettings `json:",omitempty" yaml:"settings,omitempty" structs:",omitempty"` 43 SettingsHash string `json:",omitempty" yaml:"setting_hash,omitempty" structs:",omitempty"` 44 } 45 46 // AutoBackupSettings 自動バックアップ設定 47 type AutoBackupSettings struct { 48 Autobackup *AutoBackupSetting `json:",omitempty" yaml:"autobackup,omitempty" structs:",omitempty"` // HACK: 注: API側がキャメルケースになっていない 49 } 50 51 // AutoBackupSetting 自動バックアップ設定 52 type AutoBackupSetting struct { 53 BackupSpanType types.EBackupSpanType `json:",omitempty" yaml:"backup_span_type,omitempty" structs:",omitempty"` 54 BackupSpanWeekdays []types.EDayOfTheWeek `json:",omitempty" yaml:"backup_span_weekdays,omitempty" structs:",omitempty"` 55 MaximumNumberOfArchives int `json:",omitempty" yaml:"maximum_number_of_archives,omitempty" structs:",omitempty"` 56 } 57 58 // AutoBackupStatus 自動バックアップステータス 59 type AutoBackupStatus struct { 60 DiskID types.ID `json:"DiskId,omitempty" yaml:"disk_id,omitempty" structs:",omitempty"` 61 AccountID types.ID `json:"AccountId,omitempty" yaml:"account_id,omitempty" structs:",omitempty"` 62 ZoneID types.ID `json:"ZoneId,omitempty" yaml:"zone_id,omitempty" structs:",omitempty"` 63 ZoneName string `json:",omitempty" yaml:"zone_name,omitempty" structs:",omitempty"` 64 }