@@ -681,6 +681,47 @@ func (enum *ServerAction) UnmarshalJSON(data []byte) error {
681681 return nil
682682}
683683
684+ type ServerFilesystemState string
685+
686+ const (
687+ ServerFilesystemStateUnknownState = ServerFilesystemState ("unknown_state" )
688+ ServerFilesystemStateAttaching = ServerFilesystemState ("attaching" )
689+ ServerFilesystemStateAvailable = ServerFilesystemState ("available" )
690+ ServerFilesystemStateDetaching = ServerFilesystemState ("detaching" )
691+ )
692+
693+ func (enum ServerFilesystemState ) String () string {
694+ if enum == "" {
695+ // return default value if empty
696+ return string (ServerFilesystemStateUnknownState )
697+ }
698+ return string (enum )
699+ }
700+
701+ func (enum ServerFilesystemState ) Values () []ServerFilesystemState {
702+ return []ServerFilesystemState {
703+ "unknown_state" ,
704+ "attaching" ,
705+ "available" ,
706+ "detaching" ,
707+ }
708+ }
709+
710+ func (enum ServerFilesystemState ) MarshalJSON () ([]byte , error ) {
711+ return []byte (fmt .Sprintf (`"%s"` , enum )), nil
712+ }
713+
714+ func (enum * ServerFilesystemState ) UnmarshalJSON (data []byte ) error {
715+ tmp := ""
716+
717+ if err := json .Unmarshal (data , & tmp ); err != nil {
718+ return err
719+ }
720+
721+ * enum = ServerFilesystemState (ServerFilesystemState (tmp ).String ())
722+ return nil
723+ }
724+
684725type ServerIPIPFamily string
685726
686727const (
@@ -1402,6 +1443,14 @@ type SecurityGroupSummary struct {
14021443 Name string `json:"name"`
14031444}
14041445
1446+ // ServerFilesystem: server filesystem.
1447+ type ServerFilesystem struct {
1448+ FilesystemID string `json:"filesystem_id"`
1449+
1450+ // State: default value: unknown_state
1451+ State ServerFilesystemState `json:"state"`
1452+ }
1453+
14051454// ServerIP: server ip.
14061455type ServerIP struct {
14071456 // ID: unique ID of the IP address.
@@ -1673,6 +1722,9 @@ type Server struct {
16731722 // AdminPasswordEncryptedValue: this value is reset when admin_password_encryption_ssh_key_id is set to an empty string.
16741723 AdminPasswordEncryptedValue * string `json:"admin_password_encrypted_value"`
16751724
1725+ // Filesystems: list of attached filesystems.
1726+ Filesystems []* ServerFilesystem `json:"filesystems"`
1727+
16761728 // EndOfService: true if the Instance type has reached end of service.
16771729 EndOfService bool `json:"end_of_service"`
16781730}
0 commit comments