users

package
v0.0.0-...-63319d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchDelete

func BatchDelete(c *golangsdk.ServiceClient, opts DeleteOpts, accounts []string) error

BatchDelete is a method to delete all (enterprise) users using given list.

Types

type CorpBasicInfo

type CorpBasicInfo struct {
	// Administrator account.
	Account string `json:"account"`
	// business location.
	Address string `json:"address"`
	// Administrator name.
	AdminName string `json:"adminName"`
	// Whether to support automatic account opening.
	AutoUserCreate bool `json:"autoUserCreate"`
	// The country to which the administrator's phone belongs.
	Country string `json:"country"`
	// Administrator email.
	Email string `json:"email"`
	// Whether it has pstn function.
	EnablePstn bool `json:"enablePstn"`
	// Whether to send meeting notices via SMS.
	EnableSMS bool `json:"enableSMS"`
	// Corporation ID.
	Id string `json:"id"`
	// Corporation name.
	Name string `json:"name"`
	// Admin phone number.
	Phone string `json:"phone"`
	// Whether to open cloud disk.
	EnableCloudDisk bool `json:"enableCloudDisk"`
	// Type of corporation.
	CorpType int `json:"corpType"`
}

type CreateOpts

type CreateOpts struct {
	// Enterprise user name.
	// maxLength: 64
	// minLength: 1
	Name string `json:"name" required:"true"`
	// HUAWEI CLOUD meeting user account, if it is carried, it shall prevail; otherwise, it will be automatically generated in the background. The account is unique in the whole system
	// The account number can only contain uppercase and lowercase letters, numbers, _, -, ., and @ symbols, and cannot be pure numbers and a . sign after @.
	// maxLength: 64
	// minLength: 0
	// Description: used for account/password authentication
	Account string `json:"account,omitempty"`
	// Third-party User ID
	// Description: used in App ID authentication mode
	ThirdAccount string `json:"thirdAccount,omitempty"`
	// The country the phone number belongs to.
	// Default: chinaPR.
	// maxLength: 255
	// minLength: 0
	Country string `json:"country,omitempty"`
	// Department ID, if not carried, the default root department.
	// Default: 1
	// maxLength: 32
	// minLength: 0
	DeptCode string `json:"deptCode,omitempty"`
	// Description.
	// maxLength: 128
	// minLength: 0
	Description string `json:"desc,omitempty"`
	// Email.
	// maxLength: 255
	// minLength: 0
	// Unified email format, if the enterprise turns off the SMS function, the email is required,
	// otherwise the mobile phone and email are required.
	Email string `json:"email,omitempty"`
	// The English name of the enterprise user.
	// maxLength: 64
	// minLength: 0
	EnglishName string `json:"englishName,omitempty"`
	// User function bits.
	Function *UserFunction `json:"function,omitempty"`
	// Mobile phone number, country code must be added.
	// For example, the mobile phone in mainland China is "+86xxxxxxxxxxxx".
	// When filling in the mobile phone number, the "country" parameter is required.
	// Only pure numbers are allowed for mobile phone numbers.
	// Description: Fill in at least one mobile phone number or email address.
	// maxLength: 32
	// minLength: 0
	Phone string `json:"phone,omitempty"`
	// Whether to hide the phone number.
	// When set to true, the mobile phone number will not be displayed in the address book and conference.
	// Default: false
	HidePhone *bool `json:"hidePhone,omitempty"`
	// The password of the enterprise user account. If it is carried, the actual carrying shall prevail.
	// Otherwise, it will be generated by default in the background, and the password must meet the following
	// requirements:
	//   1, 8-32 bits
	//   2. It cannot be consistent with the positive and reverse order of the account
	//   3. Contains at least two character types: lowercase letters, uppercase letters, numbers,
	//      special characters (` ~ ! @ # $ % ^ & * ( ) - _ = + | [ { } ] ; : " ,' < . > / ?)
	Password string `json:"pwd,omitempty"`
	// Whether to send email and SMS notifications for account opening.
	// 0: do not send
	// Send without filling in or other values, and send by default
	// maxLength: 32
	// minLength: 0
	SendNotify string `json:"sendNotify,omitempty"`
	// Signature.
	// maxLength: 512
	// minLength: 0
	Signature string `json:"signature,omitempty"`
	// Address book sorting level, the lower the serial number, the higher the priority.
	// Default: 10000
	// maximum: 10000
	//minimum: 1
	SortLevel int `json:"sortLevel,omitempty"`
	// user status.
	//   0: normal
	//   1: disable
	// default: 0
	Status *int `json:"status,omitempty"`
	// Position (title).
	// maxLength: 32
	// minLength: 0
	Title string `json:"title,omitempty"`
	// Authorization token.
	Token string `json:"-" required:"true"`
}

type DeleteOpts

type DeleteOpts struct {
	// Account type.
	//   0: HUAWEI CLOUD conference account. Used for account/password authentication.
	//   1: Third-party User ID, used for App ID authentication.
	// default 0
	AccountType *int `q:"accountType"`
	// Authorization token.
	Token string `json:"-"`
}

type DeviceInfo

type DeviceInfo struct {
	// Equipment end product dimensions.
	DeviceSize string `json:"deviceSize"`
	// Terminal model.
	Model string `json:"model"`
	// Terminal equipment purchase channels.
	PurchaseChannel string `json:"purchaseChannel"`
}

type ErrResponse

type ErrResponse struct {
	// Error code.
	Code string `json:"error_code"`
	// Error message.
	Message string `json:"error_msg"`
	// Request ID.
	RequestId string `json:"request_id"`
}

type GetOpts

type GetOpts struct {
	// account account.
	// If it is an account/password authentication method, it refers to the HUAWEI CLOUD conference account
	// If it is the App ID authentication method, it refers to the third-party User ID
	Account string `json:"-"`
	// Account type.
	//   0: HUAWEI CLOUD conference account. Used for account/password authentication.
	//   1: Third-party User ID, used for App ID authentication.
	// default 0
	AccountType int `q:"accountType"`
	// Authorization token.
	Token string `json:"-"`
}

type UpdateOpts

type UpdateOpts struct {
	// account account.
	// If it is an account/password authentication method, it refers to the HUAWEI CLOUD conference account
	// If it is the App ID authentication method, it refers to the third-party User ID
	Account string `json:"-" required:"true"`
	// Account type.
	//   0: HUAWEI CLOUD conference account. Used for account/password authentication.
	//   1: Third-party User ID, used for App ID authentication.
	// default 0
	AccountType *int `q:"accountType"`
	// The country the phone number belongs to.
	// Default: chinaPR.
	// maxLength: 255
	// minLength: 0
	Country string `json:"country,omitempty"`
	// Department ID, if not carried, the default root department.
	// Default: 1
	// maxLength: 32
	// minLength: 0
	DeptCode *string `json:"deptCode,omitempty"`
	// Description.
	// maxLength: 128
	// minLength: 0
	Description *string `json:"desc,omitempty"`
	// Email.
	// maxLength:255
	// minLength:0
	Email *string `json:"email,omitempty"`
	// The English name of the enterprise user.
	// maxLength: 64
	// minLength: 0
	EnglishName *string `json:"englishName,omitempty"`
	// Whether to hide the phone number.
	// Default: false
	HidePhone *bool `json:"hidePhone,omitempty"`
	// Enterprise user name.
	// maxLength: 64
	// minLength: 1
	Name string `json:"name,omitempty"`
	// Mobile phone number, country code must be added.
	// For example, the mobile phone in mainland China is "+86xxxxxxxxxxxx".
	// When filling in the mobile phone number, the "country" parameter is required.
	// Only pure numbers are allowed for mobile phone numbers.
	// Description: Fill in at least one mobile phone number or email address.
	// maxLength: 32
	// minLength: 0
	Phone string `json:"phone,omitempty"`
	// Signature.
	// maxLength:512
	// minLength:0
	Signature *string `json:"signature,omitempty"`
	// Address book sorting level, the lower the serial number, the higher the priority.
	// Default: 10000
	// maximum: 10000
	//minimum: 1
	SortLevel int `json:"sortLevel,omitempty"`
	// user status.
	// 0: normal
	// 1: disable
	// default: 0
	Status *int `json:"status,omitempty"`
	// Position (Title).
	// maxLength: 32
	// minLength: 0
	Title *string `json:"title,omitempty"`
	// Personal meeting ID, if not carried, it will be generated by default in the background.
	// maxLength: 32
	// minLength: 0
	VmrId *string `json:"vmrId,omitempty"`
	// Authorization token.
	Token string `json:"-" required:"true"`
}

type User

type User struct {
	// Activation time, UTC timestamp.
	ActiveTime int `json:"activeTime"`
	// Administrator type.
	//   0: default (super) admin
	//   1: Ordinary administrator
	//   2: Non-administrator (that is, an ordinary enterprise member, valid when UserType is 2)
	AdminType int `json:"adminType"`
	// Business registration information.
	// This data is only returned when users query their own information.
	Corp CorpBasicInfo `json:"corp"`
	// The country to which the phone number belongs.
	Country string `json:"country"`
	// Department code.
	DeptCode string `json:"deptCode"`
	// Department name.
	DeptName string `json:"deptName"`
	// Department full name.
	DeptNamePath string `json:"deptNamePath"`
	// Description.
	Description string `json:"desc"`
	// Binding device type information.
	DevType DeviceInfo `json:"devType"`
	// Email.
	Email string `json:"email"`
	// English name.
	EnglishName string `json:"englishName"`
	// User function bits.
	Function UserFunction `json:"function"`
	// Whether to hide the phone number.
	HidePhone bool `json:"hidePhone"`
	// User ID.
	ID string `json:"id"`
	// License.
	//   0: commercial;
	//   1: Free trial.
	License int `json:"license"`
	// Name.
	Name string `json:"name"`
	// Phone number.
	Phone string `json:"phone"`
	// Signature.
	Signature string `json:"signature"`
	// SIP number.
	SipNum string `json:"sipNum"`
	// Address book sorting level, the lower the serial number, the higher the priority.
	SortLevel int `json:"sortLevel"`
	// user status.
	//   0: normal;
	//   1: Disable.
	Status int `json:"status"`
	// Third-party User ID.
	ThirdAccount string `json:"thirdAccount"`
	// Position (Title).
	Title string `json:"title"`
	// HUAWEI CLOUD conference user account.
	UserAccount string `json:"userAccount"`
	// User type.
	// 2: Enterprise member account
	UserType int `json:"userType"`
	// Smart screen unique account.
	VisionAccount string `json:"visionAccount"`
	// Cloud meeting room list.
	VmrList []UserVmr `json:"vmrList"`
}

func Create

func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*User, error)

Create is a method to create a new (enterprise) user using given parameters.

func Get

func Get(c *golangsdk.ServiceClient, opts GetOpts) (*User, error)

Get is a method to create a new (enterprise) user using given parameters.

func Update

func Update(c *golangsdk.ServiceClient, opts UpdateOpts) (*User, error)

Update is a method to create a new (enterprise) user using given parameters.

type UserFunction

type UserFunction struct {
	// Whether to enable the intelligent collaborative whiteboard function.
	// If it is enabled, it means that the account is used for the intelligent collaborative whiteboard,
	// which occupies the resources of the enterprise intelligent collaborative whiteboard.
	// If the resources are insufficient, it cannot be opened.
	// Default: false.
	EnableRoom bool `json:"enableRoom,omitempty"`
}

type UserVmr

type UserVmr struct {
	// The ID of the cloud meeting room.
	// Corresponds to the vmrID in the create conference interface.
	ID string `json:"id"`
	// Fixed meeting ID of the cloud meeting room.
	// Corresponds to the vmrConferenceID of the data returned by the Create Conference API.
	VmrId string `json:"vmrId"`
	// Cloud meeting room name.
	VmrName string `json:"vmrName"`
	// VMR mode.
	//   0: Personal meeting ID
	//   1: Cloud meeting room
	//   2: Webinar
	VmrMode int `json:"vmrMode"`
	// The id of the cloud conference room package. Only cloud conference rooms are returned.
	VmrPkgId string `json:"vmrPkgId"`
	// The participation time of the cloud conference room package.
	// If it is 0, it means unlimited time, and only the cloud conference room is returned.
	VmrPkgLength int `json:"vmrPkgLength"`
	// The name of the cloud conference room package. Only cloud conference rooms are returned.
	VmrPkgName string `json:"vmrPkgName"`
	// The number of concurrent parties in the cloud conference room package.
	// Only the cloud conference room is returned.
	VmrPkgParties int `json:"vmrPkgParties"`
	// Cloud meeting room status.
	//   0: normal
	//   1: disable
	//   2: unassigned
	Status int `json:"status"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL