github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/workspace/v2/users/results.go (about)

     1  package users
     2  
     3  // RequestResp is the structure that represents the API response of user methods request.
     4  type RequestResp struct {
     5  	// User ID.
     6  	ID string `json:"id"`
     7  }
     8  
     9  // CreateResp is the structure that represents the API response of Create method request.
    10  type CreateResp struct {
    11  	RequestResp
    12  }
    13  
    14  // GetResp is the structure that represents the API response of Get method request.
    15  type GetResp struct {
    16  	UserDetail UserDetail `json:"user_detail"`
    17  }
    18  
    19  // UserDetail is an object to specified the user details.
    20  type UserDetail struct {
    21  	// User ID.
    22  	ID string `json:"id"`
    23  	// User name.
    24  	Name string `json:"user_name"`
    25  	// User email.
    26  	Email string `json:"user_email"`
    27  	// User description.
    28  	Description string `json:"description"`
    29  	// User SID.
    30  	SID string `json:"object_sid"`
    31  	// Login account name (pre Windows).
    32  	SamAccountName string `json:"sam_account_name"`
    33  	// Login user name.
    34  	UserPrincipalName string `json:"user_principal_name"`
    35  	// Full name.
    36  	FullName string `json:"full_name"`
    37  	// Unique location of user on the domain tree.
    38  	DistinguishedName string `json:"distinguished_name"`
    39  	// Account type.
    40  	AccountType int `json:"account_type"`
    41  	// The character corresponding to the creation time and UTC time milliseconds.
    42  	CreatedAt string `json:"when_created"`
    43  	// UTC time corresponding to the last day of the account validity, in milliseconds.
    44  	AccountExpires int `json:"account_expires"`
    45  	// Whether the user is expired.
    46  	UserExpired bool `json:"user_expired"`
    47  	// Whether the account is locked.
    48  	Locked bool `json:"locked"`
    49  	// Whether to allow password modification.
    50  	EnableChangePassword bool `json:"enable_change_password"`
    51  	// Whether the password will never expires.
    52  	PasswordNeverExpires bool `json:"password_never_expired"`
    53  	// Whether the next login requires a password reset.
    54  	NextLoginChangePassword bool `json:"next_login_change_password"`
    55  	// Whether the account is disabled.
    56  	Disabled bool `json:"disabled"`
    57  	// Group name list.
    58  	GroupNames []string `json:"group_names"`
    59  	// The number of desktops the user has.
    60  	TotalDesktops int `json:"total_desktops"`
    61  }
    62  
    63  // QueryResp is the structure that represents the API response of List method request.
    64  type QueryResp struct {
    65  	// Total number of users.
    66  	TotalCount int `json:"total_count"`
    67  	// User list.
    68  	Users []User `json:"users"`
    69  }
    70  
    71  // User is an object to specified the some user information.
    72  type User struct {
    73  	// User ID.
    74  	ID string `json:"id"`
    75  	// User name.
    76  	Name string `json:"user_name"`
    77  	// User email.
    78  	Email string `json:"user_email"`
    79  	// The number of desktops the user has.
    80  	TotalDesktops int `json:"total_desktops"`
    81  	// Account expiration time, 0 means it will never expire.
    82  	AccountExpires string `json:"account_expires"`
    83  	// Whether the account has expired.
    84  	AccountExpired bool `json:"account_expired"`
    85  	// Whether the password will never expires.
    86  	PasswordNeverExpires bool `json:"password_never_expired"`
    87  	// Whether to allow password modification.
    88  	EnableChangePassword bool `json:"enable_change_password"`
    89  	// Whether the next login requires a password reset.
    90  	NextLoginChangePassword bool `json:"next_login_change_password"`
    91  	// User description.
    92  	Description string `json:"description"`
    93  	// Whether the account is locked.
    94  	Locked bool `json:"locked"`
    95  	// Whether the account is disabled.
    96  	Disabled bool `json:"disabled"`
    97  }
    98  
    99  // UpdateResp is the structure that represents the API response of Update method request.
   100  type UpdateResp struct {
   101  	RequestResp
   102  }