From 5d713c492baa14fde0dc67bdf00d2df06cf01699 Mon Sep 17 00:00:00 2001 From: krrrr38 Date: Mon, 14 Oct 2024 06:28:00 +0900 Subject: [PATCH] update latest specs Signed-off-by: krrrr38 --- generated/api/zoomphone/oas_client_gen.go | 374 +++++++- generated/api/zoomphone/oas_json_gen.go | 897 +++++++++++++++++- generated/api/zoomphone/oas_parameters_gen.go | 20 +- .../api/zoomphone/oas_request_encoders_gen.go | 20 + .../zoomphone/oas_response_decoders_gen.go | 143 +++ generated/api/zoomphone/oas_schemas_gen.go | 575 +++++++++-- generated/api/zoomphone/oas_validators_gen.go | 62 ++ generated/api/zoomuser/oas_client_gen.go | 40 +- generated/api/zoomuser/oas_parameters_gen.go | 8 +- .../api/zoomuser/oas_response_decoders_gen.go | 9 + generated/api/zoomuser/oas_schemas_gen.go | 2 + generated/api/zoomuser/oas_validators_gen.go | 263 ++++- scripts/patchSpec.js | 31 - spec/ZoomPhoneAPISpec.json | 402 ++++++-- spec/ZoomUserAPISpec.json | 84 +- 15 files changed, 2694 insertions(+), 236 deletions(-) diff --git a/generated/api/zoomphone/oas_client_gen.go b/generated/api/zoomphone/oas_client_gen.go index 5fc4d26..c86fb5d 100644 --- a/generated/api/zoomphone/oas_client_gen.go +++ b/generated/api/zoomphone/oas_client_gen.go @@ -1789,7 +1789,7 @@ type Invoker interface { GetACommonArea(ctx context.Context, params GetACommonAreaParams) (*GetACommonAreaOK, error) // GetADevice invokes getADevice operation. // - // Gets detailed information about a specific [desk phone device](https://support.zoom. + // Returns detailed information about a specific [desk phone device](https://support.zoom. // us/hc/en-us/articles/360021119092). // **Prerequisites:** // * Pro or a higher account with Zoom Phone license @@ -1797,7 +1797,7 @@ type Invoker interface { // **Scopes:** `phone:read:admin` // **Granular Scopes:** `phone:read:device:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Light`. + // `LIGHT`. // // GET /phone/devices/{deviceId} GetADevice(ctx context.Context, params GetADeviceParams) (*GetADeviceOK, error) @@ -2046,15 +2046,15 @@ type Invoker interface { GetCommonAreaOutboundCallingCountriesAndRegions(ctx context.Context, params GetCommonAreaOutboundCallingCountriesAndRegionsParams) (*GetCommonAreaOutboundCallingCountriesAndRegionsOK, error) // GetCommonAreaSettings invokes getCommonAreaSettings operation. // - // Use this API to get common area settings. - // **Note**: For use by customers who opted for `Common Area Optimization` + // Returns common area settings. + // **Note**: For customers who opted for `Common Area Optimization`. // **Prerequisites:** // * Pro or a higher account with Zoom Phone license. // * Account owner or admin permissions. // **Scopes:** `phone:read:admin` // **Granular Scopes:** `phone:read:list_common_area_settings:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Light`. + // `LIGHT`. // // GET /phone/common_areas/{commonAreaId}/settings GetCommonAreaSettings(ctx context.Context, params GetCommonAreaSettingsParams) (*GetCommonAreaSettingsOK, error) @@ -2138,6 +2138,16 @@ type Invoker interface { // // GET /phone/monitoring_groups/{monitoringGroupId} GetMonitoringGroupById(ctx context.Context, params GetMonitoringGroupByIdParams) (*GetMonitoringGroupByIdOK, error) + // GetNumberCampaignOptStatus invokes getNumberCampaignOptStatus operation. + // + // Returns the opt statuses of phone numbers that are assigned to SMS the campaign. + // **Scopes:** `phone:read:admin` + // **Granular Scopes:** `phone:read:sms_campaign_number_opt_status:admin` + // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** + // `LIGHT`. + // + // GET /phone/sms_campaigns/{smsCampaignId}/phone_numbers/opt_status + GetNumberCampaignOptStatus(ctx context.Context, params GetNumberCampaignOptStatusParams) (*GetNumberCampaignOptStatusOK, error) // GetPSOperationLogs invokes getPSOperationLogs operation. // // Retrieves the phone system operation logs report. @@ -3325,17 +3335,17 @@ type Invoker interface { PhoneUserRecordings(ctx context.Context, params PhoneUserRecordingsParams) (*PhoneUserRecordingsOK, error) // PhoneUserSettings invokes phoneUserSettings operation. // - // Gets the Zoom Phone [profile settings](https://support.zoom. + // Returns the Zoom Phone [profile settings](https://support.zoom. // us/hc/en-us/articles/360021325712-Configuring-Settings) of a user. For user-level apps, pass [the // `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of // the `userId` parameter. // **Prerequisites:** // * A Business or Enterprise account // * A Zoom Phone license - // **Scopes:** `phone:read:admin`,`phone:read` + // **Scopes:** `phone:read`,`phone:read:admin` // **Granular Scopes:** `phone:read:user_setting:admin`,`phone:read:user_setting` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Light`. + // `LIGHT`. // // GET /phone/users/{userId}/settings PhoneUserSettings(ctx context.Context, params PhoneUserSettingsParams) (*PhoneUserSettingsOK, error) @@ -4096,6 +4106,16 @@ type Invoker interface { // // PATCH /phone/monitoring_groups/{monitoringGroupId} UpdateMonitoringGroup(ctx context.Context, request OptUpdateMonitoringGroupReq, params UpdateMonitoringGroupParams) error + // UpdateNumberCampaignOptStatus invokes updateNumberCampaignOptStatus operation. + // + // Updates opt statuses of phone numbers that are assigned to the SMS campaign. + // **Scopes:** `phone:write:admin` + // **Granular Scopes:** `phone:update:sms_campaign_number_opt_status:admin` + // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** + // `LIGHT`. + // + // PATCH /phone/sms_campaigns/{smsCampaignId}/phone_numbers/opt_status + UpdateNumberCampaignOptStatus(ctx context.Context, request OptUpdateNumberCampaignOptStatusReq, params UpdateNumberCampaignOptStatusParams) error // UpdatePeeringPhoneNumbers invokes updatePeeringPhoneNumbers operation. // // Updates phone numbers to Zoom through the Provider Exchange. @@ -22771,7 +22791,7 @@ func (c *Client) sendGetACommonArea(ctx context.Context, params GetACommonAreaPa // GetADevice invokes getADevice operation. // -// Gets detailed information about a specific [desk phone device](https://support.zoom. +// Returns detailed information about a specific [desk phone device](https://support.zoom. // us/hc/en-us/articles/360021119092). // **Prerequisites:** // * Pro or a higher account with Zoom Phone license @@ -22779,7 +22799,7 @@ func (c *Client) sendGetACommonArea(ctx context.Context, params GetACommonAreaPa // **Scopes:** `phone:read:admin` // **Granular Scopes:** `phone:read:device:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Light`. +// `LIGHT`. // // GET /phone/devices/{deviceId} func (c *Client) GetADevice(ctx context.Context, params GetADeviceParams) (*GetADeviceOK, error) { @@ -25594,15 +25614,15 @@ func (c *Client) sendGetCommonAreaOutboundCallingCountriesAndRegions(ctx context // GetCommonAreaSettings invokes getCommonAreaSettings operation. // -// Use this API to get common area settings. -// **Note**: For use by customers who opted for `Common Area Optimization` +// Returns common area settings. +// **Note**: For customers who opted for `Common Area Optimization`. // **Prerequisites:** // * Pro or a higher account with Zoom Phone license. // * Account owner or admin permissions. // **Scopes:** `phone:read:admin` // **Granular Scopes:** `phone:read:list_common_area_settings:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Light`. +// `LIGHT`. // // GET /phone/common_areas/{commonAreaId}/settings func (c *Client) GetCommonAreaSettings(ctx context.Context, params GetCommonAreaSettingsParams) (*GetCommonAreaSettingsOK, error) { @@ -26605,6 +26625,186 @@ func (c *Client) sendGetMonitoringGroupById(ctx context.Context, params GetMonit return result, nil } +// GetNumberCampaignOptStatus invokes getNumberCampaignOptStatus operation. +// +// Returns the opt statuses of phone numbers that are assigned to SMS the campaign. +// **Scopes:** `phone:read:admin` +// **Granular Scopes:** `phone:read:sms_campaign_number_opt_status:admin` +// **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** +// `LIGHT`. +// +// GET /phone/sms_campaigns/{smsCampaignId}/phone_numbers/opt_status +func (c *Client) GetNumberCampaignOptStatus(ctx context.Context, params GetNumberCampaignOptStatusParams) (*GetNumberCampaignOptStatusOK, error) { + res, err := c.sendGetNumberCampaignOptStatus(ctx, params) + return res, err +} + +func (c *Client) sendGetNumberCampaignOptStatus(ctx context.Context, params GetNumberCampaignOptStatusParams) (res *GetNumberCampaignOptStatusOK, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("getNumberCampaignOptStatus"), + semconv.HTTPRequestMethodKey.String("GET"), + semconv.HTTPRouteKey.String("/phone/sms_campaigns/{smsCampaignId}/phone_numbers/opt_status"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, float64(float64(elapsedDuration)/float64(time.Millisecond)), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "GetNumberCampaignOptStatus", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/phone/sms_campaigns/" + { + // Encode "smsCampaignId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "smsCampaignId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SmsCampaignId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/phone_numbers/opt_status" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeQueryParams" + q := uri.NewQueryEncoder() + { + // Encode "consumer_phone_number" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "consumer_phone_number", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.StringToString(params.ConsumerPhoneNumber)) + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "zoom_phone_user_numbers" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "zoom_phone_user_numbers", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeArray(func(e uri.Encoder) error { + for i, item := range params.ZoomPhoneUserNumbers { + if err := func() error { + return e.EncodeValue(conv.StringToString(item)) + }(); err != nil { + return errors.Wrapf(err, "[%d]", i) + } + } + return nil + }) + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + u.RawQuery = q.Values().Encode() + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:OpenapiAuthorization" + switch err := c.securityOpenapiAuthorization(ctx, "GetNumberCampaignOptStatus", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"OpenapiAuthorization\"") + } + } + { + stage = "Security:OpenapiOAuth" + switch err := c.securityOpenapiOAuth(ctx, "GetNumberCampaignOptStatus", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"OpenapiOAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000011}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeGetNumberCampaignOptStatusResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + // GetPSOperationLogs invokes getPSOperationLogs operation. // // Retrieves the phone system operation logs report. @@ -42142,17 +42342,17 @@ func (c *Client) sendPhoneUserRecordings(ctx context.Context, params PhoneUserRe // PhoneUserSettings invokes phoneUserSettings operation. // -// Gets the Zoom Phone [profile settings](https://support.zoom. +// Returns the Zoom Phone [profile settings](https://support.zoom. // us/hc/en-us/articles/360021325712-Configuring-Settings) of a user. For user-level apps, pass [the // `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of // the `userId` parameter. // **Prerequisites:** // * A Business or Enterprise account // * A Zoom Phone license -// **Scopes:** `phone:read:admin`,`phone:read` +// **Scopes:** `phone:read`,`phone:read:admin` // **Granular Scopes:** `phone:read:user_setting:admin`,`phone:read:user_setting` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Light`. +// `LIGHT`. // // GET /phone/users/{userId}/settings func (c *Client) PhoneUserSettings(ctx context.Context, params PhoneUserSettingsParams) (*PhoneUserSettingsOK, error) { @@ -50577,6 +50777,148 @@ func (c *Client) sendUpdateMonitoringGroup(ctx context.Context, request OptUpdat return result, nil } +// UpdateNumberCampaignOptStatus invokes updateNumberCampaignOptStatus operation. +// +// Updates opt statuses of phone numbers that are assigned to the SMS campaign. +// **Scopes:** `phone:write:admin` +// **Granular Scopes:** `phone:update:sms_campaign_number_opt_status:admin` +// **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** +// `LIGHT`. +// +// PATCH /phone/sms_campaigns/{smsCampaignId}/phone_numbers/opt_status +func (c *Client) UpdateNumberCampaignOptStatus(ctx context.Context, request OptUpdateNumberCampaignOptStatusReq, params UpdateNumberCampaignOptStatusParams) error { + _, err := c.sendUpdateNumberCampaignOptStatus(ctx, request, params) + return err +} + +func (c *Client) sendUpdateNumberCampaignOptStatus(ctx context.Context, request OptUpdateNumberCampaignOptStatusReq, params UpdateNumberCampaignOptStatusParams) (res *UpdateNumberCampaignOptStatusNoContent, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("updateNumberCampaignOptStatus"), + semconv.HTTPRequestMethodKey.String("PATCH"), + semconv.HTTPRouteKey.String("/phone/sms_campaigns/{smsCampaignId}/phone_numbers/opt_status"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, float64(float64(elapsedDuration)/float64(time.Millisecond)), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "UpdateNumberCampaignOptStatus", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/phone/sms_campaigns/" + { + // Encode "smsCampaignId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "smsCampaignId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SmsCampaignId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/phone_numbers/opt_status" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "PATCH", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + if err := encodeUpdateNumberCampaignOptStatusRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:OpenapiAuthorization" + switch err := c.securityOpenapiAuthorization(ctx, "UpdateNumberCampaignOptStatus", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"OpenapiAuthorization\"") + } + } + { + stage = "Security:OpenapiOAuth" + switch err := c.securityOpenapiOAuth(ctx, "UpdateNumberCampaignOptStatus", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"OpenapiOAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000011}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeUpdateNumberCampaignOptStatusResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + // UpdatePeeringPhoneNumbers invokes updatePeeringPhoneNumbers operation. // // Updates phone numbers to Zoom through the Provider Exchange. diff --git a/generated/api/zoomphone/oas_json_gen.go b/generated/api/zoomphone/oas_json_gen.go index 6b7215d..1278ad5 100644 --- a/generated/api/zoomphone/oas_json_gen.go +++ b/generated/api/zoomphone/oas_json_gen.go @@ -24560,19 +24560,40 @@ func (s *GetADeviceOK) encodeFields(e *jx.Encoder) { s.ProvisionTemplateID.Encode(e) } } + { + if s.PrivateIP.Set { + e.FieldStart("private_ip") + s.PrivateIP.Encode(e) + } + } + { + if s.PublicIP.Set { + e.FieldStart("public_ip") + s.PublicIP.Encode(e) + } + } + { + if s.Policy.Set { + e.FieldStart("policy") + s.Policy.Encode(e) + } + } } -var jsonFieldsNameOfGetADeviceOK = [10]string{ - 0: "assignee", - 1: "assignees", - 2: "device_type", - 3: "display_name", - 4: "id", - 5: "mac_address", - 6: "provision", - 7: "site", - 8: "status", - 9: "provision_template_id", +var jsonFieldsNameOfGetADeviceOK = [13]string{ + 0: "assignee", + 1: "assignees", + 2: "device_type", + 3: "display_name", + 4: "id", + 5: "mac_address", + 6: "provision", + 7: "site", + 8: "status", + 9: "provision_template_id", + 10: "private_ip", + 11: "public_ip", + 12: "policy", } // Decode decodes GetADeviceOK from json. @@ -24690,6 +24711,36 @@ func (s *GetADeviceOK) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"provision_template_id\"") } + case "private_ip": + if err := func() error { + s.PrivateIP.Reset() + if err := s.PrivateIP.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"private_ip\"") + } + case "public_ip": + if err := func() error { + s.PublicIP.Reset() + if err := s.PublicIP.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"public_ip\"") + } + case "policy": + if err := func() error { + s.Policy.Reset() + if err := s.Policy.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"policy\"") + } default: return d.Skip() } @@ -24959,6 +25010,212 @@ func (s *GetADeviceOKAssigneesItem) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *GetADeviceOKPolicy) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetADeviceOKPolicy) encodeFields(e *jx.Encoder) { + { + if s.CallControl.Set { + e.FieldStart("call_control") + s.CallControl.Encode(e) + } + } + { + if s.HotDesking.Set { + e.FieldStart("hot_desking") + s.HotDesking.Encode(e) + } + } +} + +var jsonFieldsNameOfGetADeviceOKPolicy = [2]string{ + 0: "call_control", + 1: "hot_desking", +} + +// Decode decodes GetADeviceOKPolicy from json. +func (s *GetADeviceOKPolicy) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetADeviceOKPolicy to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "call_control": + if err := func() error { + s.CallControl.Reset() + if err := s.CallControl.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"call_control\"") + } + case "hot_desking": + if err := func() error { + s.HotDesking.Reset() + if err := s.HotDesking.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"hot_desking\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetADeviceOKPolicy") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetADeviceOKPolicy) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetADeviceOKPolicy) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetADeviceOKPolicyCallControl) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetADeviceOKPolicyCallControl) encodeFields(e *jx.Encoder) { + { + if s.Status.Set { + e.FieldStart("status") + s.Status.Encode(e) + } + } +} + +var jsonFieldsNameOfGetADeviceOKPolicyCallControl = [1]string{ + 0: "status", +} + +// Decode decodes GetADeviceOKPolicyCallControl from json. +func (s *GetADeviceOKPolicyCallControl) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetADeviceOKPolicyCallControl to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "status": + if err := func() error { + s.Status.Reset() + if err := s.Status.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"status\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetADeviceOKPolicyCallControl") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetADeviceOKPolicyCallControl) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetADeviceOKPolicyCallControl) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetADeviceOKPolicyHotDesking) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetADeviceOKPolicyHotDesking) encodeFields(e *jx.Encoder) { + { + if s.Status.Set { + e.FieldStart("status") + s.Status.Encode(e) + } + } +} + +var jsonFieldsNameOfGetADeviceOKPolicyHotDesking = [1]string{ + 0: "status", +} + +// Decode decodes GetADeviceOKPolicyHotDesking from json. +func (s *GetADeviceOKPolicyHotDesking) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetADeviceOKPolicyHotDesking to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "status": + if err := func() error { + s.Status.Reset() + if err := s.Status.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"status\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetADeviceOKPolicyHotDesking") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetADeviceOKPolicyHotDesking) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetADeviceOKPolicyHotDesking) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *GetADeviceOKProvision) Encode(e *jx.Encoder) { e.ObjStart() @@ -47087,20 +47344,41 @@ func (s *GetCommonAreaSettingsOKDeskPhonesItem) encodeFields(e *jx.Encoder) { s.Status.Encode(e) } } + { + if s.MACAddress.Set { + e.FieldStart("mac_address") + s.MACAddress.Encode(e) + } + } { if s.HotDesking.Set { e.FieldStart("hot_desking") s.HotDesking.Encode(e) } } + { + if s.PrivateIP.Set { + e.FieldStart("private_ip") + s.PrivateIP.Encode(e) + } + } + { + if s.PublicIP.Set { + e.FieldStart("public_ip") + s.PublicIP.Encode(e) + } + } } -var jsonFieldsNameOfGetCommonAreaSettingsOKDeskPhonesItem = [5]string{ +var jsonFieldsNameOfGetCommonAreaSettingsOKDeskPhonesItem = [8]string{ 0: "id", 1: "display_name", 2: "device_type", 3: "status", - 4: "hot_desking", + 4: "mac_address", + 5: "hot_desking", + 6: "private_ip", + 7: "public_ip", } // Decode decodes GetCommonAreaSettingsOKDeskPhonesItem from json. @@ -47151,6 +47429,16 @@ func (s *GetCommonAreaSettingsOKDeskPhonesItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"status\"") } + case "mac_address": + if err := func() error { + s.MACAddress.Reset() + if err := s.MACAddress.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mac_address\"") + } case "hot_desking": if err := func() error { s.HotDesking.Reset() @@ -47161,6 +47449,26 @@ func (s *GetCommonAreaSettingsOKDeskPhonesItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"hot_desking\"") } + case "private_ip": + if err := func() error { + s.PrivateIP.Reset() + if err := s.PrivateIP.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"private_ip\"") + } + case "public_ip": + if err := func() error { + s.PublicIP.Reset() + if err := s.PublicIP.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"public_ip\"") + } default: return d.Skip() } @@ -55983,6 +56291,242 @@ func (s *GetMonitoringGroupByIdOKSite) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *GetNumberCampaignOptStatusOK) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetNumberCampaignOptStatusOK) encodeFields(e *jx.Encoder) { + { + e.FieldStart("phone_number_campaign_opt_statuses") + e.ArrStart() + for _, elem := range s.PhoneNumberCampaignOptStatuses { + elem.Encode(e) + } + e.ArrEnd() + } +} + +var jsonFieldsNameOfGetNumberCampaignOptStatusOK = [1]string{ + 0: "phone_number_campaign_opt_statuses", +} + +// Decode decodes GetNumberCampaignOptStatusOK from json. +func (s *GetNumberCampaignOptStatusOK) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetNumberCampaignOptStatusOK to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "phone_number_campaign_opt_statuses": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + s.PhoneNumberCampaignOptStatuses = make([]GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem + if err := elem.Decode(d); err != nil { + return err + } + s.PhoneNumberCampaignOptStatuses = append(s.PhoneNumberCampaignOptStatuses, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"phone_number_campaign_opt_statuses\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetNumberCampaignOptStatusOK") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetNumberCampaignOptStatusOK) { + name = jsonFieldsNameOfGetNumberCampaignOptStatusOK[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetNumberCampaignOptStatusOK) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetNumberCampaignOptStatusOK) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) encodeFields(e *jx.Encoder) { + { + e.FieldStart("consumer_phone_number") + e.Str(s.ConsumerPhoneNumber) + } + { + e.FieldStart("zoom_phone_user_number") + e.Str(s.ZoomPhoneUserNumber) + } + { + e.FieldStart("opt_status") + e.Str(s.OptStatus) + } +} + +var jsonFieldsNameOfGetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem = [3]string{ + 0: "consumer_phone_number", + 1: "zoom_phone_user_number", + 2: "opt_status", +} + +// Decode decodes GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem from json. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "consumer_phone_number": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ConsumerPhoneNumber = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"consumer_phone_number\"") + } + case "zoom_phone_user_number": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ZoomPhoneUserNumber = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"zoom_phone_user_number\"") + } + case "opt_status": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.OptStatus = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"opt_status\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) { + name = jsonFieldsNameOfGetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *GetPSOperationLogsOK) Encode(e *jx.Encoder) { e.ObjStart() @@ -104736,6 +105280,105 @@ func (s *OptGetADeviceOKAssignee) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode encodes GetADeviceOKPolicy as json. +func (o OptGetADeviceOKPolicy) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes GetADeviceOKPolicy from json. +func (o *OptGetADeviceOKPolicy) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptGetADeviceOKPolicy to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptGetADeviceOKPolicy) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptGetADeviceOKPolicy) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes GetADeviceOKPolicyCallControl as json. +func (o OptGetADeviceOKPolicyCallControl) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes GetADeviceOKPolicyCallControl from json. +func (o *OptGetADeviceOKPolicyCallControl) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptGetADeviceOKPolicyCallControl to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptGetADeviceOKPolicyCallControl) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptGetADeviceOKPolicyCallControl) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes GetADeviceOKPolicyHotDesking as json. +func (o OptGetADeviceOKPolicyHotDesking) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes GetADeviceOKPolicyHotDesking from json. +func (o *OptGetADeviceOKPolicyHotDesking) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptGetADeviceOKPolicyHotDesking to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptGetADeviceOKPolicyHotDesking) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptGetADeviceOKPolicyHotDesking) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes GetADeviceOKProvision as json. func (o OptGetADeviceOKProvision) Encode(e *jx.Encoder) { if !o.Set { @@ -120023,6 +120666,39 @@ func (s *OptUpdateMonitoringGroupReq) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode encodes UpdateNumberCampaignOptStatusReq as json. +func (o OptUpdateNumberCampaignOptStatusReq) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes UpdateNumberCampaignOptStatusReq from json. +func (o *OptUpdateNumberCampaignOptStatusReq) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptUpdateNumberCampaignOptStatusReq to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptUpdateNumberCampaignOptStatusReq) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptUpdateNumberCampaignOptStatusReq) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes UpdatePeeringPhoneNumbersReq as json. func (o OptUpdatePeeringPhoneNumbersReq) Encode(e *jx.Encoder) { if !o.Set { @@ -136482,14 +137158,35 @@ func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) encodeFields(e *jx.Encoder) { s.Status.Encode(e) } } + { + if s.MACAddress.Set { + e.FieldStart("mac_address") + s.MACAddress.Encode(e) + } + } + { + if s.PrivateIP.Set { + e.FieldStart("private_ip") + s.PrivateIP.Encode(e) + } + } + { + if s.PublicIP.Set { + e.FieldStart("public_ip") + s.PublicIP.Encode(e) + } + } } -var jsonFieldsNameOfPhoneUserSettingsOKDeskPhoneDevicesItem = [5]string{ +var jsonFieldsNameOfPhoneUserSettingsOKDeskPhoneDevicesItem = [8]string{ 0: "device_type", 1: "display_name", 2: "id", 3: "policy", 4: "status", + 5: "mac_address", + 6: "private_ip", + 7: "public_ip", } // Decode decodes PhoneUserSettingsOKDeskPhoneDevicesItem from json. @@ -136550,6 +137247,36 @@ func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"status\"") } + case "mac_address": + if err := func() error { + s.MACAddress.Reset() + if err := s.MACAddress.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mac_address\"") + } + case "private_ip": + if err := func() error { + s.PrivateIP.Reset() + if err := s.PrivateIP.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"private_ip\"") + } + case "public_ip": + if err := func() error { + s.PublicIP.Reset() + if err := s.PublicIP.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"public_ip\"") + } default: return d.Skip() } @@ -148177,6 +148904,148 @@ func (s *UpdateMonitoringGroupReq) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *UpdateNumberCampaignOptStatusReq) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateNumberCampaignOptStatusReq) encodeFields(e *jx.Encoder) { + { + e.FieldStart("consumer_phone_number") + e.Str(s.ConsumerPhoneNumber) + } + { + e.FieldStart("zoom_phone_user_numbers") + e.ArrStart() + for _, elem := range s.ZoomPhoneUserNumbers { + e.Str(elem) + } + e.ArrEnd() + } + { + e.FieldStart("opt_status") + e.Str(s.OptStatus) + } +} + +var jsonFieldsNameOfUpdateNumberCampaignOptStatusReq = [3]string{ + 0: "consumer_phone_number", + 1: "zoom_phone_user_numbers", + 2: "opt_status", +} + +// Decode decodes UpdateNumberCampaignOptStatusReq from json. +func (s *UpdateNumberCampaignOptStatusReq) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateNumberCampaignOptStatusReq to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "consumer_phone_number": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ConsumerPhoneNumber = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"consumer_phone_number\"") + } + case "zoom_phone_user_numbers": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + s.ZoomPhoneUserNumbers = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.ZoomPhoneUserNumbers = append(s.ZoomPhoneUserNumbers, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"zoom_phone_user_numbers\"") + } + case "opt_status": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.OptStatus = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"opt_status\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateNumberCampaignOptStatusReq") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateNumberCampaignOptStatusReq) { + name = jsonFieldsNameOfUpdateNumberCampaignOptStatusReq[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateNumberCampaignOptStatusReq) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateNumberCampaignOptStatusReq) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *UpdatePeeringPhoneNumbersOK) Encode(e *jx.Encoder) { e.ObjStart() diff --git a/generated/api/zoomphone/oas_parameters_gen.go b/generated/api/zoomphone/oas_parameters_gen.go index af03df7..76b3816 100644 --- a/generated/api/zoomphone/oas_parameters_gen.go +++ b/generated/api/zoomphone/oas_parameters_gen.go @@ -774,7 +774,7 @@ type GetACommonAreaParams struct { // GetADeviceParams is parameters of getADevice operation. type GetADeviceParams struct { - // Unique Identifier of the device. + // The unique Identifier of the device. DeviceId string } @@ -991,6 +991,16 @@ type GetMonitoringGroupByIdParams struct { MonitoringGroupId string } +// GetNumberCampaignOptStatusParams is parameters of getNumberCampaignOptStatus operation. +type GetNumberCampaignOptStatusParams struct { + // The SMS campaign ID. + SmsCampaignId string + // Thw end user's phone number that sends the Opt-in or Opt-out keyword to the Zoom Phone number. + ConsumerPhoneNumber string + // The Zoom users' phone numbers that receive the Opt-in or Opt-out keyword from the end user. + ZoomPhoneUserNumbers []string +} + // GetPSOperationLogsParams is parameters of getPSOperationLogs operation. type GetPSOperationLogsParams struct { // The start time and date in **yyyy-mm-dd**format. The date range defined by the `from` and `to` @@ -1038,7 +1048,7 @@ type GetPhoneRecordingsParams struct { // same format as the `from` parameter. To OptDate // The owner type. - // The allowed values are `null`, `user`, `sharedOfice`, or `callQueue`. + // The allowed values are `null`, `user`, `sharedOffice`, or `callQueue`. // The default value is `null`. If the value is `null`, it returns all owner types. OwnerType OptString // The recording type. The allowed values are `null`, `OnDemand`, or `Automatic`. The default value @@ -2586,6 +2596,12 @@ type UpdateMonitoringGroupParams struct { MonitoringGroupId string } +// UpdateNumberCampaignOptStatusParams is parameters of updateNumberCampaignOptStatus operation. +type UpdateNumberCampaignOptStatusParams struct { + // The SMS campaign ID. + SmsCampaignId string +} + // UpdatePhoneNumberDetailsParams is parameters of updatePhoneNumberDetails operation. type UpdatePhoneNumberDetailsParams struct { // The unique identifier of the phone number. diff --git a/generated/api/zoomphone/oas_request_encoders_gen.go b/generated/api/zoomphone/oas_request_encoders_gen.go index 75cbe14..3eaf9dc 100644 --- a/generated/api/zoomphone/oas_request_encoders_gen.go +++ b/generated/api/zoomphone/oas_request_encoders_gen.go @@ -1871,6 +1871,26 @@ func encodeUpdateMonitoringGroupRequest( return nil } +func encodeUpdateNumberCampaignOptStatusRequest( + req OptUpdateNumberCampaignOptStatusReq, + r *http.Request, +) error { + const contentType = "application/json" + if !req.Set { + // Keep request with empty body if value is not set. + return nil + } + e := new(jx.Encoder) + { + if req.Set { + req.Encode(e) + } + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} + func encodeUpdatePeeringPhoneNumbersRequest( req OptUpdatePeeringPhoneNumbersReq, r *http.Request, diff --git a/generated/api/zoomphone/oas_response_decoders_gen.go b/generated/api/zoomphone/oas_response_decoders_gen.go index fdd467d..d3dbdcc 100644 --- a/generated/api/zoomphone/oas_response_decoders_gen.go +++ b/generated/api/zoomphone/oas_response_decoders_gen.go @@ -10149,6 +10149,98 @@ func decodeGetMonitoringGroupByIdResponse(resp *http.Response) (res *GetMonitori return res, errors.Wrap(defRes, "error") } +func decodeGetNumberCampaignOptStatusResponse(resp *http.Response) (res *GetNumberCampaignOptStatusOK, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response GetNumberCampaignOptStatusOK + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + // Convenient error response. + defRes, err := func() (res *ErrorResponseStatusCode, err error) { + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ErrorResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &ErrorResponseStatusCode{ + StatusCode: resp.StatusCode, + Response: response, + }, nil + default: + return res, validate.InvalidContentType(ct) + } + }() + if err != nil { + return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) + } + return res, errors.Wrap(defRes, "error") +} + func decodeGetPSOperationLogsResponse(resp *http.Response) (res *GetPSOperationLogsOK, _ error) { switch resp.StatusCode { case 200: @@ -20217,6 +20309,57 @@ func decodeUpdateMonitoringGroupResponse(resp *http.Response) (res *UpdateMonito return res, errors.Wrap(defRes, "error") } +func decodeUpdateNumberCampaignOptStatusResponse(resp *http.Response) (res *UpdateNumberCampaignOptStatusNoContent, _ error) { + switch resp.StatusCode { + case 204: + // Code 204. + return &UpdateNumberCampaignOptStatusNoContent{}, nil + } + // Convenient error response. + defRes, err := func() (res *ErrorResponseStatusCode, err error) { + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ErrorResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &ErrorResponseStatusCode{ + StatusCode: resp.StatusCode, + Response: response, + }, nil + default: + return res, validate.InvalidContentType(ct) + } + }() + if err != nil { + return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) + } + return res, errors.Wrap(defRes, "error") +} + func decodeUpdatePeeringPhoneNumbersResponse(resp *http.Response) (res *UpdatePeeringPhoneNumbersOK, _ error) { switch resp.StatusCode { case 200: diff --git a/generated/api/zoomphone/oas_schemas_gen.go b/generated/api/zoomphone/oas_schemas_gen.go index 56c0925..ea7c29d 100644 --- a/generated/api/zoomphone/oas_schemas_gen.go +++ b/generated/api/zoomphone/oas_schemas_gen.go @@ -10284,24 +10284,30 @@ func (s *GetACommonAreaOKSite) SetName(val OptString) { } type GetADeviceOK struct { - // User to whom the device has been assigned. + // The user to whom the device has been assigned. Assignee OptGetADeviceOKAssignee `json:"assignee"` Assignees []GetADeviceOKAssigneesItem `json:"assignees"` - // Includes manufacturer name and the model name. + // This field includes the manufacturer name and the model name. DeviceType OptString `json:"device_type"` - // Display name of the device. + // The display name of the device. DisplayName OptString `json:"display_name"` - // Device ID - Unique identifier of the Device. + // The unique identifier of the device. ID OptString `json:"id"` - // MAC address or serial number of the device. + // The MAC address or serial number of the device. MACAddress OptString `json:"mac_address"` - // Provisioning information of a device. + // The provisioning information of a device. Provision OptGetADeviceOKProvision `json:"provision"` Site OptGetADeviceOKSite `json:"site"` - // Status of the device. The value is either `online` or `offline`. + // The status of the device. The value is either `online` or `offline`. Status OptString `json:"status"` - // Provision template id. Supported only by some devices. Empty string represents 'No value set'. + // The provision template ID. Supported only by some devices. Empty string represents 'No value set'. ProvisionTemplateID OptString `json:"provision_template_id"` + // The private IP of the registered device. + PrivateIP OptString `json:"private_ip"` + // The public IP of the registered device. + PublicIP OptString `json:"public_ip"` + // The device policy. + Policy OptGetADeviceOKPolicy `json:"policy"` } // GetAssignee returns the value of Assignee. @@ -10354,6 +10360,21 @@ func (s *GetADeviceOK) GetProvisionTemplateID() OptString { return s.ProvisionTemplateID } +// GetPrivateIP returns the value of PrivateIP. +func (s *GetADeviceOK) GetPrivateIP() OptString { + return s.PrivateIP +} + +// GetPublicIP returns the value of PublicIP. +func (s *GetADeviceOK) GetPublicIP() OptString { + return s.PublicIP +} + +// GetPolicy returns the value of Policy. +func (s *GetADeviceOK) GetPolicy() OptGetADeviceOKPolicy { + return s.Policy +} + // SetAssignee sets the value of Assignee. func (s *GetADeviceOK) SetAssignee(val OptGetADeviceOKAssignee) { s.Assignee = val @@ -10404,15 +10425,30 @@ func (s *GetADeviceOK) SetProvisionTemplateID(val OptString) { s.ProvisionTemplateID = val } -// User to whom the device has been assigned. +// SetPrivateIP sets the value of PrivateIP. +func (s *GetADeviceOK) SetPrivateIP(val OptString) { + s.PrivateIP = val +} + +// SetPublicIP sets the value of PublicIP. +func (s *GetADeviceOK) SetPublicIP(val OptString) { + s.PublicIP = val +} + +// SetPolicy sets the value of Policy. +func (s *GetADeviceOK) SetPolicy(val OptGetADeviceOKPolicy) { + s.Policy = val +} + +// The user to whom the device has been assigned. type GetADeviceOKAssignee struct { - // Extension number of the Zoom Phone used by the `user` or `commonArea`. + // The extension number of the Zoom Phone the `user` or `commonArea` uses. ExtensionNumber OptInt64 `json:"extension_number"` - // ID of the user or commonArea to whom the device has been assigned. + // The ID of the user or common area to whom the device has been assigned. ID OptString `json:"id"` // Name. Name OptString `json:"name"` - // Type of the assignee. Available only if the device is assigned. + // The type of the assignee. It's available only if the device is assigned. ExtensionType OptString `json:"extension_type"` } @@ -10457,15 +10493,15 @@ func (s *GetADeviceOKAssignee) SetExtensionType(val OptString) { } type GetADeviceOKAssigneesItem struct { - // Extension number of the Zoom Phone used by the `user` or `commonArea`. + // The extension number of the Zoom Phone the `user` or `commonArea` uses. ExtensionNumber OptInt64 `json:"extension_number"` - // ID of the user or commonArea to whom the device has been assigned. + // The ID of the user or common area to whom the device has been assigned. ID OptString `json:"id"` - // Name. + // The name. Name OptString `json:"name"` - // Type of the assignee. Available only if the device is assigned. + // The type of the assignee. It's available only if the device is assigned. ExtensionType OptString `json:"extension_type"` - // Extension ID of the `user` or `common area`. + // The extension ID of the `user` or `common area`. ExtensionID OptString `json:"extension_id"` } @@ -10519,18 +10555,85 @@ func (s *GetADeviceOKAssigneesItem) SetExtensionID(val OptString) { s.ExtensionID = val } -// Provisioning information of a device. +// The device policy. +type GetADeviceOKPolicy struct { + CallControl OptGetADeviceOKPolicyCallControl `json:"call_control"` + HotDesking OptGetADeviceOKPolicyHotDesking `json:"hot_desking"` +} + +// GetCallControl returns the value of CallControl. +func (s *GetADeviceOKPolicy) GetCallControl() OptGetADeviceOKPolicyCallControl { + return s.CallControl +} + +// GetHotDesking returns the value of HotDesking. +func (s *GetADeviceOKPolicy) GetHotDesking() OptGetADeviceOKPolicyHotDesking { + return s.HotDesking +} + +// SetCallControl sets the value of CallControl. +func (s *GetADeviceOKPolicy) SetCallControl(val OptGetADeviceOKPolicyCallControl) { + s.CallControl = val +} + +// SetHotDesking sets the value of HotDesking. +func (s *GetADeviceOKPolicy) SetHotDesking(val OptGetADeviceOKPolicyHotDesking) { + s.HotDesking = val +} + +type GetADeviceOKPolicyCallControl struct { + // This field enables the call control feature to the current device. It configures the desk phone + // devices to enable call control, which allows users to perform desk phone's call control actions + // from the Zoom desktop client, including making and accepting calls. + // Options include: + // * `unsupported` + // * `on` + // * `off`. + Status OptString `json:"status"` +} + +// GetStatus returns the value of Status. +func (s *GetADeviceOKPolicyCallControl) GetStatus() OptString { + return s.Status +} + +// SetStatus sets the value of Status. +func (s *GetADeviceOKPolicyCallControl) SetStatus(val OptString) { + s.Status = val +} + +type GetADeviceOKPolicyHotDesking struct { + // This field enables the hot desking feature to the current device. It lets the guest user sign in + // to the desk phone. You can't use the desk phone until the guest user signs out. + // Options include: + // * `unsupported` + // * `on` + // * `off`. + Status OptString `json:"status"` +} + +// GetStatus returns the value of Status. +func (s *GetADeviceOKPolicyHotDesking) GetStatus() OptString { + return s.Status +} + +// SetStatus sets the value of Status. +func (s *GetADeviceOKPolicyHotDesking) SetStatus(val OptString) { + s.Status = val +} + +// The provisioning information of a device. type GetADeviceOKProvision struct { - // SIP Account details registered during the device provisioning process. This object will only be - // returned if manual provisioning was used for the device. + // The SIP Account details registered during the device provisioning process. This object will only + // be returned if manual provisioning was used for the device. SipAccounts []GetADeviceOKProvisionSipAccountsItem `json:"sip_accounts"` - // [Provisioning type](https://support.zoom.us/hc/en-us/articles/360033223411). The value can be one - // of the following: + // The [provisioning type](https://support.zoom.us/hc/en-us/articles/360033223411). The value can be + // one of the following: // * `ztp` : Zero touch provisioning. // * `assisted`: Assisted provisioning. // * `manual`: Manual provisioning. Type OptString `json:"type"` - // Provisioning URL. This field will only be returned for devices that were provisioned via + // The provisioning URL. This field will only be returned for devices that were provisioned via // `assisted` provisioning type. URL OptString `json:"url"` } @@ -10566,19 +10669,19 @@ func (s *GetADeviceOKProvision) SetURL(val OptString) { } type GetADeviceOKProvisionSipAccountsItem struct { - // Authorization ID of the SIP account provided in the provisioning process. + // The authorization ID of the SIP account provided in the provisioning process. AuthorizationID OptString `json:"authorization_id"` - // Outbound proxy provided in the provisioning process. + // The outbound proxy provided in the provisioning process. OutboundProxy OptString `json:"outbound_proxy"` - // Password entered during the provisioning process. + // The password entered during the provisioning process. Password OptString `json:"password"` // The secondary outbound proxy provided in the provisioning process. SecondaryOutboundProxy OptString `json:"secondary_outbound_proxy"` - // Return additional provisioning information with generic device SIP credentials. + // This field returns additional provisioning information with generic device SIP credentials. SharedLine OptGetADeviceOKProvisionSipAccountsItemSharedLine `json:"shared_line"` - // SIP Domain provided in the provisioning process. + // The SIP domain provided in the provisioning process. SipDomain OptString `json:"sip_domain"` - // User name of the SIP account provided in the provisioning process. + // The user name of the SIP account provided in the provisioning process. UserName OptString `json:"user_name"` } @@ -10652,13 +10755,13 @@ func (s *GetADeviceOKProvisionSipAccountsItem) SetUserName(val OptString) { s.UserName = val } -// Return additional provisioning information with generic device SIP credentials. +// This field returns additional provisioning information with generic device SIP credentials. type GetADeviceOKProvisionSipAccountsItemSharedLine struct { - // Alias. + // The alias. Alias OptString `json:"alias"` // Line subscription. LineSubscription OptGetADeviceOKProvisionSipAccountsItemSharedLineLineSubscription `json:"line_subscription"` - // Outbound caller ID. + // The outbound caller ID. OutboundCallerID OptString `json:"outbound_caller_id"` } @@ -10694,11 +10797,11 @@ func (s *GetADeviceOKProvisionSipAccountsItemSharedLine) SetOutboundCallerID(val // Line subscription. type GetADeviceOKProvisionSipAccountsItemSharedLineLineSubscription struct { - // Display name. + // The display name. DisplayName OptString `json:"display_name"` - // Extension number. + // The extension number. ExtensionNumber OptInt64 `json:"extension_number"` - // Phone number. + // The phone number. PhoneNumber OptString `json:"phone_number"` } @@ -10735,7 +10838,7 @@ func (s *GetADeviceOKProvisionSipAccountsItemSharedLineLineSubscription) SetPhon type GetADeviceOKSite struct { // The [site](https://support.zoom.us/hc/en-us/articles/360020809672) of the phone user. ID OptString `json:"id"` - // Name of the [site](https://support.zoom.us/hc/en-us/articles/360020809672). + // The name of the [site](https://support.zoom.us/hc/en-us/articles/360020809672). Name OptString `json:"name"` } @@ -22414,7 +22517,7 @@ func (s *GetCommonAreaOutboundCallingCountriesAndRegionsOKCountriesRegionsItem) s.EnabledCarrier = val } -// Common area setting. +// The common area setting. type GetCommonAreaSettingsOK struct { DeskPhones []GetCommonAreaSettingsOKDeskPhonesItem `json:"desk_phones"` } @@ -22430,15 +22533,21 @@ func (s *GetCommonAreaSettingsOK) SetDeskPhones(val []GetCommonAreaSettingsOKDes } type GetCommonAreaSettingsOKDeskPhonesItem struct { - // Desk phone ID. + // The desk phone ID. ID OptString `json:"id"` - // Desk phone display name. + // The desk phone display name. DisplayName OptString `json:"display_name"` - // Desk phone device type. + // The desk phone device type. DeviceType OptString `json:"device_type"` - // Desk phone status. - Status OptString `json:"status"` + // The desk phone status. + Status OptString `json:"status"` + // The MAC address or serial number of the device. + MACAddress OptString `json:"mac_address"` HotDesking OptGetCommonAreaSettingsOKDeskPhonesItemHotDesking `json:"hot_desking"` + // The private IP of the registered device. + PrivateIP OptString `json:"private_ip"` + // The public IP of the registered device. + PublicIP OptString `json:"public_ip"` } // GetID returns the value of ID. @@ -22461,11 +22570,26 @@ func (s *GetCommonAreaSettingsOKDeskPhonesItem) GetStatus() OptString { return s.Status } +// GetMACAddress returns the value of MACAddress. +func (s *GetCommonAreaSettingsOKDeskPhonesItem) GetMACAddress() OptString { + return s.MACAddress +} + // GetHotDesking returns the value of HotDesking. func (s *GetCommonAreaSettingsOKDeskPhonesItem) GetHotDesking() OptGetCommonAreaSettingsOKDeskPhonesItemHotDesking { return s.HotDesking } +// GetPrivateIP returns the value of PrivateIP. +func (s *GetCommonAreaSettingsOKDeskPhonesItem) GetPrivateIP() OptString { + return s.PrivateIP +} + +// GetPublicIP returns the value of PublicIP. +func (s *GetCommonAreaSettingsOKDeskPhonesItem) GetPublicIP() OptString { + return s.PublicIP +} + // SetID sets the value of ID. func (s *GetCommonAreaSettingsOKDeskPhonesItem) SetID(val OptString) { s.ID = val @@ -22486,14 +22610,29 @@ func (s *GetCommonAreaSettingsOKDeskPhonesItem) SetStatus(val OptString) { s.Status = val } +// SetMACAddress sets the value of MACAddress. +func (s *GetCommonAreaSettingsOKDeskPhonesItem) SetMACAddress(val OptString) { + s.MACAddress = val +} + // SetHotDesking sets the value of HotDesking. func (s *GetCommonAreaSettingsOKDeskPhonesItem) SetHotDesking(val OptGetCommonAreaSettingsOKDeskPhonesItemHotDesking) { s.HotDesking = val } +// SetPrivateIP sets the value of PrivateIP. +func (s *GetCommonAreaSettingsOKDeskPhonesItem) SetPrivateIP(val OptString) { + s.PrivateIP = val +} + +// SetPublicIP sets the value of PublicIP. +func (s *GetCommonAreaSettingsOKDeskPhonesItem) SetPublicIP(val OptString) { + s.PublicIP = val +} + type GetCommonAreaSettingsOKDeskPhonesItemHotDesking struct { - // Allow hot desking feature to the current device: letting the guest user sign in to the desk phone. - // You can't use the desk phone until the guest user signs out. + // This field allows the hot desking feature to the current device: letting the guest user sign in to + // the desk phone. You can't use the desk phone until the guest user signs out. // Options include: // * `unsupported` // * `on` @@ -27041,6 +27180,64 @@ func (s *GetMonitoringGroupByIdOKSite) SetName(val OptString) { s.Name = val } +// The list of opt statuses. +type GetNumberCampaignOptStatusOK struct { + // The list of opt statuses for each number pair. + PhoneNumberCampaignOptStatuses []GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem `json:"phone_number_campaign_opt_statuses"` +} + +// GetPhoneNumberCampaignOptStatuses returns the value of PhoneNumberCampaignOptStatuses. +func (s *GetNumberCampaignOptStatusOK) GetPhoneNumberCampaignOptStatuses() []GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem { + return s.PhoneNumberCampaignOptStatuses +} + +// SetPhoneNumberCampaignOptStatuses sets the value of PhoneNumberCampaignOptStatuses. +func (s *GetNumberCampaignOptStatusOK) SetPhoneNumberCampaignOptStatuses(val []GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) { + s.PhoneNumberCampaignOptStatuses = val +} + +// The opt status per a number pair. +type GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem struct { + // The end user's phone number in E164 format that sends the Opt-in or Opt-out keyword to the Zoom + // Phone number. + ConsumerPhoneNumber string `json:"consumer_phone_number"` + // The Zoom user's phone number in E164 format that receives the Opt-in or Opt-out keyword from the + // end user. + ZoomPhoneUserNumber string `json:"zoom_phone_user_number"` + // The opt status. + OptStatus string `json:"opt_status"` +} + +// GetConsumerPhoneNumber returns the value of ConsumerPhoneNumber. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) GetConsumerPhoneNumber() string { + return s.ConsumerPhoneNumber +} + +// GetZoomPhoneUserNumber returns the value of ZoomPhoneUserNumber. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) GetZoomPhoneUserNumber() string { + return s.ZoomPhoneUserNumber +} + +// GetOptStatus returns the value of OptStatus. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) GetOptStatus() string { + return s.OptStatus +} + +// SetConsumerPhoneNumber sets the value of ConsumerPhoneNumber. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) SetConsumerPhoneNumber(val string) { + s.ConsumerPhoneNumber = val +} + +// SetZoomPhoneUserNumber sets the value of ZoomPhoneUserNumber. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) SetZoomPhoneUserNumber(val string) { + s.ZoomPhoneUserNumber = val +} + +// SetOptStatus sets the value of OptStatus. +func (s *GetNumberCampaignOptStatusOKPhoneNumberCampaignOptStatusesItem) SetOptStatus(val string) { + s.OptStatus = val +} + // Merged schema. type GetPSOperationLogsOK struct { // The next page token paginates through a large set of result. A next page token returns whenever @@ -52924,6 +53121,144 @@ func (o OptGetADeviceOKAssignee) Or(d GetADeviceOKAssignee) GetADeviceOKAssignee return d } +// NewOptGetADeviceOKPolicy returns new OptGetADeviceOKPolicy with value set to v. +func NewOptGetADeviceOKPolicy(v GetADeviceOKPolicy) OptGetADeviceOKPolicy { + return OptGetADeviceOKPolicy{ + Value: v, + Set: true, + } +} + +// OptGetADeviceOKPolicy is optional GetADeviceOKPolicy. +type OptGetADeviceOKPolicy struct { + Value GetADeviceOKPolicy + Set bool +} + +// IsSet returns true if OptGetADeviceOKPolicy was set. +func (o OptGetADeviceOKPolicy) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptGetADeviceOKPolicy) Reset() { + var v GetADeviceOKPolicy + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptGetADeviceOKPolicy) SetTo(v GetADeviceOKPolicy) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptGetADeviceOKPolicy) Get() (v GetADeviceOKPolicy, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptGetADeviceOKPolicy) Or(d GetADeviceOKPolicy) GetADeviceOKPolicy { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptGetADeviceOKPolicyCallControl returns new OptGetADeviceOKPolicyCallControl with value set to v. +func NewOptGetADeviceOKPolicyCallControl(v GetADeviceOKPolicyCallControl) OptGetADeviceOKPolicyCallControl { + return OptGetADeviceOKPolicyCallControl{ + Value: v, + Set: true, + } +} + +// OptGetADeviceOKPolicyCallControl is optional GetADeviceOKPolicyCallControl. +type OptGetADeviceOKPolicyCallControl struct { + Value GetADeviceOKPolicyCallControl + Set bool +} + +// IsSet returns true if OptGetADeviceOKPolicyCallControl was set. +func (o OptGetADeviceOKPolicyCallControl) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptGetADeviceOKPolicyCallControl) Reset() { + var v GetADeviceOKPolicyCallControl + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptGetADeviceOKPolicyCallControl) SetTo(v GetADeviceOKPolicyCallControl) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptGetADeviceOKPolicyCallControl) Get() (v GetADeviceOKPolicyCallControl, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptGetADeviceOKPolicyCallControl) Or(d GetADeviceOKPolicyCallControl) GetADeviceOKPolicyCallControl { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptGetADeviceOKPolicyHotDesking returns new OptGetADeviceOKPolicyHotDesking with value set to v. +func NewOptGetADeviceOKPolicyHotDesking(v GetADeviceOKPolicyHotDesking) OptGetADeviceOKPolicyHotDesking { + return OptGetADeviceOKPolicyHotDesking{ + Value: v, + Set: true, + } +} + +// OptGetADeviceOKPolicyHotDesking is optional GetADeviceOKPolicyHotDesking. +type OptGetADeviceOKPolicyHotDesking struct { + Value GetADeviceOKPolicyHotDesking + Set bool +} + +// IsSet returns true if OptGetADeviceOKPolicyHotDesking was set. +func (o OptGetADeviceOKPolicyHotDesking) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptGetADeviceOKPolicyHotDesking) Reset() { + var v GetADeviceOKPolicyHotDesking + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptGetADeviceOKPolicyHotDesking) SetTo(v GetADeviceOKPolicyHotDesking) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptGetADeviceOKPolicyHotDesking) Get() (v GetADeviceOKPolicyHotDesking, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptGetADeviceOKPolicyHotDesking) Or(d GetADeviceOKPolicyHotDesking) GetADeviceOKPolicyHotDesking { + if v, ok := o.Get(); ok { + return v + } + return d +} + // NewOptGetADeviceOKProvision returns new OptGetADeviceOKProvision with value set to v. func NewOptGetADeviceOKProvision(v GetADeviceOKProvision) OptGetADeviceOKProvision { return OptGetADeviceOKProvision{ @@ -74332,6 +74667,52 @@ func (o OptUpdateMonitoringGroupReq) Or(d UpdateMonitoringGroupReq) UpdateMonito return d } +// NewOptUpdateNumberCampaignOptStatusReq returns new OptUpdateNumberCampaignOptStatusReq with value set to v. +func NewOptUpdateNumberCampaignOptStatusReq(v UpdateNumberCampaignOptStatusReq) OptUpdateNumberCampaignOptStatusReq { + return OptUpdateNumberCampaignOptStatusReq{ + Value: v, + Set: true, + } +} + +// OptUpdateNumberCampaignOptStatusReq is optional UpdateNumberCampaignOptStatusReq. +type OptUpdateNumberCampaignOptStatusReq struct { + Value UpdateNumberCampaignOptStatusReq + Set bool +} + +// IsSet returns true if OptUpdateNumberCampaignOptStatusReq was set. +func (o OptUpdateNumberCampaignOptStatusReq) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptUpdateNumberCampaignOptStatusReq) Reset() { + var v UpdateNumberCampaignOptStatusReq + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptUpdateNumberCampaignOptStatusReq) SetTo(v UpdateNumberCampaignOptStatusReq) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptUpdateNumberCampaignOptStatusReq) Get() (v UpdateNumberCampaignOptStatusReq, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptUpdateNumberCampaignOptStatusReq) Or(d UpdateNumberCampaignOptStatusReq) UpdateNumberCampaignOptStatusReq { + if v, ok := o.Get(); ok { + return v + } + return d +} + // NewOptUpdatePeeringPhoneNumbersReq returns new OptUpdatePeeringPhoneNumbersReq with value set to v. func NewOptUpdatePeeringPhoneNumbersReq(v UpdatePeeringPhoneNumbersReq) OptUpdatePeeringPhoneNumbersReq { return OptUpdatePeeringPhoneNumbersReq{ @@ -87645,7 +88026,7 @@ func (s *PhoneUserSettingsOKAutoCallRecordingAccessMembersItem) SetSharedID(val // The site's country. type PhoneUserSettingsOKCountry struct { - // Two lettered country [code](https://marketplace.zoom. + // The two lettered country [code](https://marketplace.zoom. // us/docs/api-reference/other-references/abbreviation-lists#countries). Code OptString `json:"code"` // The country's calling code. @@ -87740,11 +88121,11 @@ func (s *PhoneUserSettingsOKDelegation) SetLocked(val OptBool) { type PhoneUserSettingsOKDelegationAssistantsItem struct { // The display name. DisplayName OptString `json:"display_name"` - // The extension ID. + // The extension's ID. ExtensionID OptString `json:"extension_id"` - // The extension number. + // The extension's number. ExtensionNumber OptInt64 `json:"extension_number"` - // The extension type: `user` or `commonArea`. + // The extension's type: `user` or `commonArea`. ExtensionType OptString `json:"extension_type"` // The user or common area ID. ID OptString `json:"id"` @@ -87805,7 +88186,7 @@ type PhoneUserSettingsOKDeskPhone struct { // The information about the desk phones. Devices []PhoneUserSettingsOKDeskPhoneDevicesItem `json:"devices"` KeysPositions OptPhoneUserSettingsOKDeskPhoneKeysPositions `json:"keys_positions"` - // After enabling this option, you can lock your desk phone screen. PIN Code is required to unlock + // After enabling this option, you can lock your desk phone screen. A PIN code is required to unlock // your phone. This feature is not supported on some devices. See [Supported Device // Types](https://support.zoom.us/hc/en-us/articles/360029698771) for more information. PhoneScreenLock OptBool `json:"phone_screen_lock"` @@ -87864,6 +88245,12 @@ type PhoneUserSettingsOKDeskPhoneDevicesItem struct { Policy OptPhoneUserSettingsOKDeskPhoneDevicesItemPolicy `json:"policy"` // The status of the device: `online` or `offline`. Status OptString `json:"status"` + // The MAC address or serial number of the device. + MACAddress OptString `json:"mac_address"` + // The private IP of the registered device. + PrivateIP OptString `json:"private_ip"` + // The public IP of the registered device. + PublicIP OptString `json:"public_ip"` } // GetDeviceType returns the value of DeviceType. @@ -87891,6 +88278,21 @@ func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) GetStatus() OptString { return s.Status } +// GetMACAddress returns the value of MACAddress. +func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) GetMACAddress() OptString { + return s.MACAddress +} + +// GetPrivateIP returns the value of PrivateIP. +func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) GetPrivateIP() OptString { + return s.PrivateIP +} + +// GetPublicIP returns the value of PublicIP. +func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) GetPublicIP() OptString { + return s.PublicIP +} + // SetDeviceType sets the value of DeviceType. func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) SetDeviceType(val OptString) { s.DeviceType = val @@ -87916,6 +88318,21 @@ func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) SetStatus(val OptString) { s.Status = val } +// SetMACAddress sets the value of MACAddress. +func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) SetMACAddress(val OptString) { + s.MACAddress = val +} + +// SetPrivateIP sets the value of PrivateIP. +func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) SetPrivateIP(val OptString) { + s.PrivateIP = val +} + +// SetPublicIP sets the value of PublicIP. +func (s *PhoneUserSettingsOKDeskPhoneDevicesItem) SetPublicIP(val OptString) { + s.PublicIP = val +} + // The device policy. type PhoneUserSettingsOKDeskPhoneDevicesItemPolicy struct { CallControl OptPhoneUserSettingsOKDeskPhoneDevicesItemPolicyCallControl `json:"call_control"` @@ -88026,13 +88443,13 @@ func (s *PhoneUserSettingsOKIntercom) SetDevice(val OptPhoneUserSettingsOKInterc } type PhoneUserSettingsOKIntercomAudioIntercomsItem struct { - // The extension ID. + // The extension's ID. ExtensionID OptString `json:"extension_id"` - // The extension number. + // The extension's number. ExtensionNumber OptString `json:"extension_number"` - // The extension type: `user` or `commonArea`. + // The extension's type: `user` or `commonArea`. ExtensionType OptString `json:"extension_type"` - // The display name. + // The display's name. DisplayName OptString `json:"display_name"` // The status of the extension: `active` or `pending`. Status OptString `json:"status"` @@ -88114,9 +88531,9 @@ func (s *PhoneUserSettingsOKIntercomAudioIntercomsItem) SetDeviceStatus(val OptS // The selected default device to which all your intercom calls will be routed. type PhoneUserSettingsOKIntercomDevice struct { - // The device ID. + // The device's ID. ID OptString `json:"id"` - // The device name. + // The device's name. Name OptString `json:"name"` } @@ -88160,9 +88577,9 @@ type PhoneUserSettingsOKOutboundCallerIdsItem struct { // Whether the outbound caller ID is the default or not. If `true`, the outbound caller ID is the // default caller ID. IsDefault OptBool `json:"is_default"` - // The outbound caller name. + // The outbound caller's name. Name OptString `json:"name"` - // The outbound caller number. + // The outbound caller's number. Number OptString `json:"number"` } @@ -93387,6 +93804,50 @@ func (s *UpdateMonitoringGroupReq) SetSiteID(val OptString) { s.SiteID = val } +// UpdateNumberCampaignOptStatusNoContent is response for UpdateNumberCampaignOptStatus operation. +type UpdateNumberCampaignOptStatusNoContent struct{} + +// The request payload to update the opt statuses for phone numbers that are assigned to the SMS +// campaign. +type UpdateNumberCampaignOptStatusReq struct { + // The end user's phone number that sends the Opt-in or Opt-out keyword to the Zoom Phone number. + ConsumerPhoneNumber string `json:"consumer_phone_number"` + // The Zoom users' phone numbers that receive the Opt-in or Opt-out keyword from the end user. + ZoomPhoneUserNumbers []string `json:"zoom_phone_user_numbers"` + // The opt status: either `opt_in` or `opt_out`. + OptStatus string `json:"opt_status"` +} + +// GetConsumerPhoneNumber returns the value of ConsumerPhoneNumber. +func (s *UpdateNumberCampaignOptStatusReq) GetConsumerPhoneNumber() string { + return s.ConsumerPhoneNumber +} + +// GetZoomPhoneUserNumbers returns the value of ZoomPhoneUserNumbers. +func (s *UpdateNumberCampaignOptStatusReq) GetZoomPhoneUserNumbers() []string { + return s.ZoomPhoneUserNumbers +} + +// GetOptStatus returns the value of OptStatus. +func (s *UpdateNumberCampaignOptStatusReq) GetOptStatus() string { + return s.OptStatus +} + +// SetConsumerPhoneNumber sets the value of ConsumerPhoneNumber. +func (s *UpdateNumberCampaignOptStatusReq) SetConsumerPhoneNumber(val string) { + s.ConsumerPhoneNumber = val +} + +// SetZoomPhoneUserNumbers sets the value of ZoomPhoneUserNumbers. +func (s *UpdateNumberCampaignOptStatusReq) SetZoomPhoneUserNumbers(val []string) { + s.ZoomPhoneUserNumbers = val +} + +// SetOptStatus sets the value of OptStatus. +func (s *UpdateNumberCampaignOptStatusReq) SetOptStatus(val string) { + s.OptStatus = val +} + type UpdatePeeringPhoneNumbersOK struct { // The information about unprocessed phone numbers. UnprocessedNumbers []UpdatePeeringPhoneNumbersOKUnprocessedNumbersItem `json:"unprocessed_numbers"` diff --git a/generated/api/zoomphone/oas_validators_gen.go b/generated/api/zoomphone/oas_validators_gen.go index fa516bc..8ee5fde 100644 --- a/generated/api/zoomphone/oas_validators_gen.go +++ b/generated/api/zoomphone/oas_validators_gen.go @@ -1783,6 +1783,37 @@ func (s *GetCommonAreaOutboundCallingCountriesAndRegionsOK) Validate() error { return nil } +func (s *GetNumberCampaignOptStatusOK) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.PhoneNumberCampaignOptStatuses == nil { + return errors.New("nil is invalid value") + } + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 10, + MaxLengthSet: true, + }).ValidateLength(len(s.PhoneNumberCampaignOptStatuses)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "phone_number_campaign_opt_statuses", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *GetPSOperationLogsOK) Validate() error { if s == nil { return validate.ErrNilPointer @@ -4160,6 +4191,37 @@ func (s *UpdateGCPReq) Validate() error { return nil } +func (s *UpdateNumberCampaignOptStatusReq) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.ZoomPhoneUserNumbers == nil { + return errors.New("nil is invalid value") + } + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 10, + MaxLengthSet: true, + }).ValidateLength(len(s.ZoomPhoneUserNumbers)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "zoom_phone_user_numbers", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *UpdateProvisionTemplateReq) Validate() error { if s == nil { return validate.ErrNilPointer diff --git a/generated/api/zoomuser/oas_client_gen.go b/generated/api/zoomuser/oas_client_gen.go index a5cb928..511b433 100644 --- a/generated/api/zoomuser/oas_client_gen.go +++ b/generated/api/zoomuser/oas_client_gen.go @@ -75,18 +75,18 @@ type Invoker interface { // **Prerequisite**: Pro or higher account. // **Scopes:** `contact_group:write:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Heavy`. + // `HEAVY`. // // POST /contacts/groups/{groupId}/members ContactGroupMemberAdd(ctx context.Context, request OptContactGroupMemberAddReq, params ContactGroupMemberAddParams) (*ContactGroupMemberAddCreated, error) // ContactGroupMemberRemove invokes contactGroupMemberRemove operation. // - // Use this API to remove members in a [contact group](https://support.zoom. + // Removes members in a [contact group](https://support.zoom. // us/hc/en-us/articles/204519819-Group-Management-). // **Prerequisite**: Pro or higher account. // **Scopes:** `contact_group:write:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Heavy`. + // `HEAVY`. // // DELETE /contacts/groups/{groupId}/members ContactGroupMemberRemove(ctx context.Context, params ContactGroupMemberRemoveParams) error @@ -577,7 +577,7 @@ type Invoker interface { // **Scopes:** `user:write:admin`,`user:write` // **Granular Scopes:** `user:write:assistant`,`user:write:assistant:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Medium`. + // `MEDIUM`. // // POST /users/{userId}/assistants UserAssistantCreate(ctx context.Context, request OptUserAssistantCreateReq, params UserAssistantCreateParams) (*UserAssistantCreateCreated, error) @@ -768,13 +768,13 @@ type Invoker interface { UserPictureDelete(ctx context.Context, params UserPictureDeleteParams) error // UserSSOTokenDelete invokes userSSOTokenDelete operation. // - // Revoke a user's SSO token. For user-level apps, pass [the `me` value](https://developers.zoom. + // Revokes a user's SSO token. For user-level apps, pass [the `me` value](https://developers.zoom. // us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the `userId` parameter. // After calling this API, the SSO user will be logged out of their current Zoom session. // **Scopes:** `user:write:admin`,`user:write` // **Granular Scopes:** `user:delete:token`,`user:delete:token:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Light`. + // `LIGHT`. // // DELETE /users/{userId}/token UserSSOTokenDelete(ctx context.Context, params UserSSOTokenDeleteParams) error @@ -864,23 +864,23 @@ type Invoker interface { UserStatus(ctx context.Context, request OptUserStatusReq, params UserStatusParams) error // UserSummary invokes userSummary operation. // - // Use this API to get a summary of users, including the number and types of users in the account. + // Gets a summary of users, including the number and types of users in the account. // **Scopes:** `user:read`,`user:write`,`user:read:admin`,`user:write:admin` // **Granular Scopes:** `user:read:summary:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Medium`. + // `MEDIUM`. // // GET /users/summary UserSummary(ctx context.Context) (*UserSummaryOK, error) // UserToken invokes userToken operation. // - // Get a user's Zoom token or Zoom Access Key (ZAK). For user-level apps, pass [the `me` + // Gets a user's Zoom token or Zoom Access Key (ZAK). For user-level apps, pass [the `me` // value](https://developers.zoom.us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the // `userId` parameter. // **Scopes:** `user:read`,`user:write`,`user:read:admin`,`user:write:admin`,`user_profile` // **Granular Scopes:** `user:read:token`,`user:read:token:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** - // `Light`. + // `LIGHT`. // // GET /users/{userId}/token UserToken(ctx context.Context, params UserTokenParams) (*UserTokenOK, error) @@ -1516,7 +1516,7 @@ func (c *Client) sendContactGroupDelete(ctx context.Context, params ContactGroup // **Prerequisite**: Pro or higher account. // **Scopes:** `contact_group:write:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Heavy`. +// `HEAVY`. // // POST /contacts/groups/{groupId}/members func (c *Client) ContactGroupMemberAdd(ctx context.Context, request OptContactGroupMemberAddReq, params ContactGroupMemberAddParams) (*ContactGroupMemberAddCreated, error) { @@ -1654,12 +1654,12 @@ func (c *Client) sendContactGroupMemberAdd(ctx context.Context, request OptConta // ContactGroupMemberRemove invokes contactGroupMemberRemove operation. // -// Use this API to remove members in a [contact group](https://support.zoom. +// Removes members in a [contact group](https://support.zoom. // us/hc/en-us/articles/204519819-Group-Management-). // **Prerequisite**: Pro or higher account. // **Scopes:** `contact_group:write:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Heavy`. +// `HEAVY`. // // DELETE /contacts/groups/{groupId}/members func (c *Client) ContactGroupMemberRemove(ctx context.Context, params ContactGroupMemberRemoveParams) error { @@ -6898,7 +6898,7 @@ func (c *Client) sendUser(ctx context.Context, params UserParams) (res *UserOK, // **Scopes:** `user:write:admin`,`user:write` // **Granular Scopes:** `user:write:assistant`,`user:write:assistant:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Medium`. +// `MEDIUM`. // // POST /users/{userId}/assistants func (c *Client) UserAssistantCreate(ctx context.Context, request OptUserAssistantCreateReq, params UserAssistantCreateParams) (*UserAssistantCreateCreated, error) { @@ -8772,13 +8772,13 @@ func (c *Client) sendUserPictureDelete(ctx context.Context, params UserPictureDe // UserSSOTokenDelete invokes userSSOTokenDelete operation. // -// Revoke a user's SSO token. For user-level apps, pass [the `me` value](https://developers.zoom. +// Revokes a user's SSO token. For user-level apps, pass [the `me` value](https://developers.zoom. // us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the `userId` parameter. // After calling this API, the SSO user will be logged out of their current Zoom session. // **Scopes:** `user:write:admin`,`user:write` // **Granular Scopes:** `user:delete:token`,`user:delete:token:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Light`. +// `LIGHT`. // // DELETE /users/{userId}/token func (c *Client) UserSSOTokenDelete(ctx context.Context, params UserSSOTokenDeleteParams) error { @@ -9871,11 +9871,11 @@ func (c *Client) sendUserStatus(ctx context.Context, request OptUserStatusReq, p // UserSummary invokes userSummary operation. // -// Use this API to get a summary of users, including the number and types of users in the account. +// Gets a summary of users, including the number and types of users in the account. // **Scopes:** `user:read`,`user:write`,`user:read:admin`,`user:write:admin` // **Granular Scopes:** `user:read:summary:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Medium`. +// `MEDIUM`. // // GET /users/summary func (c *Client) UserSummary(ctx context.Context) (*UserSummaryOK, error) { @@ -9991,13 +9991,13 @@ func (c *Client) sendUserSummary(ctx context.Context) (res *UserSummaryOK, err e // UserToken invokes userToken operation. // -// Get a user's Zoom token or Zoom Access Key (ZAK). For user-level apps, pass [the `me` +// Gets a user's Zoom token or Zoom Access Key (ZAK). For user-level apps, pass [the `me` // value](https://developers.zoom.us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the // `userId` parameter. // **Scopes:** `user:read`,`user:write`,`user:read:admin`,`user:write:admin`,`user_profile` // **Granular Scopes:** `user:read:token`,`user:read:token:admin` // **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** -// `Light`. +// `LIGHT`. // // GET /users/{userId}/token func (c *Client) UserToken(ctx context.Context, params UserTokenParams) (*UserTokenOK, error) { diff --git a/generated/api/zoomuser/oas_parameters_gen.go b/generated/api/zoomuser/oas_parameters_gen.go index 86bfa32..a6657b3 100644 --- a/generated/api/zoomuser/oas_parameters_gen.go +++ b/generated/api/zoomuser/oas_parameters_gen.go @@ -20,18 +20,20 @@ type ContactGroupDeleteParams struct { // ContactGroupMemberAddParams is parameters of contactGroupMemberAdd operation. type ContactGroupMemberAddParams struct { - // The group ID. + // The contact group ID. + // Retrieve by calling the List contact groups API. GroupId string } // ContactGroupMemberRemoveParams is parameters of contactGroupMemberRemove operation. type ContactGroupMemberRemoveParams struct { + // The contact group ID. + // Retrieve by calling the List contact groups API. + GroupId string // The member's ID in a contact group. Use commas (,) to separate a maximum of 20 ids. // Can be retrieved by calling the [**List contact // groups**](/docs/api-reference/zoom-api/methods#operation/contactGroupMembers) API. MemberIds string - // The group ID. - GroupId string } // ContactGroupMembersParams is parameters of contactGroupMembers operation. diff --git a/generated/api/zoomuser/oas_response_decoders_gen.go b/generated/api/zoomuser/oas_response_decoders_gen.go index 007654f..17cfb14 100644 --- a/generated/api/zoomuser/oas_response_decoders_gen.go +++ b/generated/api/zoomuser/oas_response_decoders_gen.go @@ -47,6 +47,15 @@ func decodeBulkUpdateFeatureResponse(resp *http.Response) (res *BulkUpdateFeatur } return res, err } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } return &response, nil default: return res, validate.InvalidContentType(ct) diff --git a/generated/api/zoomuser/oas_schemas_gen.go b/generated/api/zoomuser/oas_schemas_gen.go index 3bfd0db..1631df4 100644 --- a/generated/api/zoomuser/oas_schemas_gen.go +++ b/generated/api/zoomuser/oas_schemas_gen.go @@ -387,6 +387,7 @@ func (s *ContactGroupCreateReqGroupMembersItem) SetID(val OptString) { type ContactGroupDeleteNoContent struct{} type ContactGroupMemberAddCreated struct { + // Member ids array. MemberIds []string `json:"member_ids"` } @@ -401,6 +402,7 @@ func (s *ContactGroupMemberAddCreated) SetMemberIds(val []string) { } type ContactGroupMemberAddReq struct { + // Group members array. GroupMembers []ContactGroupMemberAddReqGroupMembersItem `json:"group_members"` } diff --git a/generated/api/zoomuser/oas_validators_gen.go b/generated/api/zoomuser/oas_validators_gen.go index 481d1bf..bd73898 100644 --- a/generated/api/zoomuser/oas_validators_gen.go +++ b/generated/api/zoomuser/oas_validators_gen.go @@ -10,6 +10,95 @@ import ( "github.com/ogen-go/ogen/validate" ) +func (s *BulkUpdateFeatureCreated) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 30, + MaxLengthSet: true, + }).ValidateLength(len(s.SuccessUserIds)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "success_user_ids", + Error: err, + }) + } + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 30, + MaxLengthSet: true, + }).ValidateLength(len(s.FailDetails)); err != nil { + return errors.Wrap(err, "array") + } + var failures []validate.FieldError + for i, elem := range s.FailDetails { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "fail_details", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *BulkUpdateFeatureCreatedFailDetailsItem) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 30, + MaxLengthSet: true, + }).ValidateLength(len(s.UserIds)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "user_ids", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *BulkUpdateFeatureReq) Validate() error { if s == nil { return validate.ErrNilPointer @@ -20,6 +109,14 @@ func (s *BulkUpdateFeatureReq) Validate() error { if s.Users == nil { return errors.New("nil is invalid value") } + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 30, + MaxLengthSet: true, + }).ValidateLength(len(s.Users)); err != nil { + return errors.Wrap(err, "array") + } return nil }(); err != nil { failures = append(failures, validate.FieldError{ @@ -1361,6 +1458,24 @@ func (s *UserSettingsOK0) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.Feature.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "feature", + Error: err, + }) + } if err := func() error { if value, ok := s.Recording.Get(); ok { if err := func() error { @@ -1542,6 +1657,50 @@ func (s *UserSettingsOK0AudioConferencingTollFreeAndFeeBasedTollCallNumbersItem) return nil } +func (s *UserSettingsOK0Feature) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 9, + MaxLengthSet: true, + }).ValidateLength(len(s.ZoomEventsUnlimitedCapacities)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "zoom_events_unlimited_capacities", + Error: err, + }) + } + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 9, + MaxLengthSet: true, + }).ValidateLength(len(s.ZoomSessionsUnlimitedCapacities)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "zoom_sessions_unlimited_capacities", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *UserSettingsOK0Recording) Validate() error { if s == nil { return validate.ErrNilPointer @@ -1759,6 +1918,24 @@ func (s *UserSettingsUpdateReq0) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.Feature.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "feature", + Error: err, + }) + } if err := func() error { if value, ok := s.Recording.Get(); ok { if err := func() error { @@ -1801,6 +1978,50 @@ func (s *UserSettingsUpdateReq0) Validate() error { return nil } +func (s *UserSettingsUpdateReq0Feature) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 9, + MaxLengthSet: true, + }).ValidateLength(len(s.ZoomEventsUnlimitedCapacities)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "zoom_events_unlimited_capacities", + Error: err, + }) + } + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 9, + MaxLengthSet: true, + }).ValidateLength(len(s.ZoomSessionsUnlimitedCapacities)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "zoom_sessions_unlimited_capacities", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *UserSettingsUpdateReq0Recording) Validate() error { if s == nil { return validate.ErrNilPointer @@ -2023,6 +2244,22 @@ func (s *UserUpdateReq) Validate() error { Error: err, }) } + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 5, + MaxLengthSet: true, + }).ValidateLength(len(s.CustomAttributes)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "custom_attributes", + Error: err, + }) + } if err := func() error { if value, ok := s.FirstName.Get(); ok { if err := func() error { @@ -2179,6 +2416,22 @@ func (s *UserUpdateReq) Validate() error { Error: err, }) } + if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 3, + MaxLengthSet: true, + }).ValidateLength(len(s.PhoneNumbers)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "phone_numbers", + Error: err, + }) + } if err := func() error { if value, ok := s.Pmi.Get(); ok { if err := func() error { @@ -2277,7 +2530,7 @@ func (s *UsersOK) Validate() error { MinSet: false, Min: 0, MaxSet: true, - Max: 300, + Max: 2000, MinExclusive: false, MaxExclusive: false, MultipleOfSet: false, @@ -2298,6 +2551,14 @@ func (s *UsersOK) Validate() error { }) } if err := func() error { + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 2000, + MaxLengthSet: true, + }).ValidateLength(len(s.Users)); err != nil { + return errors.Wrap(err, "array") + } var failures []validate.FieldError for i, elem := range s.Users { if err := func() error { diff --git a/scripts/patchSpec.js b/scripts/patchSpec.js index fa9bb74..78f3b8c 100755 --- a/scripts/patchSpec.js +++ b/scripts/patchSpec.js @@ -358,37 +358,6 @@ function phonePatch(spec) { } function userPatch(spec) { - // The path name and parameter name do not exist, - // so the path parameter is matched to the path name. - [ - 'post', - 'delete', - ].forEach((method) => { - const path = '/contacts/groups/{groupId}/members'; - if (!spec.paths[path]) { - return; - } - - const parameters = spec.paths[path][method].parameters ?? []; - - spec.paths[path][method] = { - ...spec.paths[path][method], - parameters: [ - ...parameters, - { - name: "groupId", - in: "path", - description: "The group ID.", - required: true, - schema: { - type: "string", - example: "A4ql1FjgL913r" - }, - }, - ] - } - }); - // OpenAPI integer type is not supported maxLength/minLength if (spec.paths['/users/{userId}']) { const pmi = spec.paths['/users/{userId}'].patch.requestBody.content['application/json'].schema.properties.pmi; diff --git a/spec/ZoomPhoneAPISpec.json b/spec/ZoomPhoneAPISpec.json index ac122e6..fd6478b 100644 --- a/spec/ZoomPhoneAPISpec.json +++ b/spec/ZoomPhoneAPISpec.json @@ -13358,7 +13358,7 @@ "Common Areas" ], "summary": "Get common area settings", - "description": "Use this API to get common area settings.\n\n**Note**: For use by customers who opted for `Common Area Optimization` \n\n**Prerequisites:**\n* Pro or a higher account with Zoom Phone license.\n* Account owner or admin permissions.\n\n\n\n**Scopes:** `phone:read:admin`\n\n**Granular Scopes:** `phone:read:list_common_area_settings:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`", + "description": "Returns common area settings.\n\n**Note**: For customers who opted for `Common Area Optimization`. \n\n**Prerequisites:**\n* Pro or a higher account with Zoom Phone license.\n* Account owner or admin permissions.\n\n\n\n**Scopes:** `phone:read:admin`\n\n**Granular Scopes:** `phone:read:list_common_area_settings:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", "operationId": "getCommonAreaSettings", "parameters": [ { @@ -13386,39 +13386,54 @@ "properties": { "id": { "type": "string", - "description": "Desk phone ID.", + "description": "The desk phone ID.", "example": "Aky1xpSLSc2PR0XOtj9XWQ" }, "display_name": { "type": "string", - "description": "Desk phone display name.", + "description": "The desk phone display name.", "example": "analog_ta" }, "device_type": { "type": "string", - "description": "Desk phone device type.", + "description": "The desk phone device type.", "example": "Poly obi504" }, "status": { "type": "string", - "description": "Desk phone status.", + "description": "The desk phone status.", "example": "offline" }, + "mac_address": { + "type": "string", + "description": "The MAC address or serial number of the device.", + "example": "203a07240534" + }, "hot_desking": { "type": "object", "properties": { "status": { "type": "string", - "description": "Allow hot desking feature to the current device: letting the guest user sign in to the desk phone. You can't use the desk phone until the guest user signs out. \nOptions include:\n* `unsupported` \n* `on` \n* `off`", + "description": "This field allows the hot desking feature to the current device: letting the guest user sign in to the desk phone. You can't use the desk phone until the guest user signs out. \nOptions include:\n* `unsupported` \n* `on` \n* `off`", "example": "off" } } + }, + "private_ip": { + "type": "string", + "description": "The private IP of the registered device.", + "example": "192.168.10.13" + }, + "public_ip": { + "type": "string", + "description": "The public IP of the registered device.", + "example": "220.148.231.126" } } } } }, - "description": "Common area setting" + "description": "The common area setting." } } } @@ -13444,6 +13459,7 @@ } ], "x-extensions": { + "x-permissions": [], "x-macro-scopes": [ "phone:read:admin" ], @@ -27051,13 +27067,13 @@ "Phone Devices" ], "summary": "Get device details", - "description": "Gets detailed information about a specific [desk phone device](https://support.zoom.us/hc/en-us/articles/360021119092).\n\n**Prerequisites:**\n* Pro or a higher account with Zoom Phone license\n* Account owner or admin permissions\n\n**Scopes:** `phone:read:admin`\n\n**Granular Scopes:** `phone:read:device:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`", + "description": "Returns detailed information about a specific [desk phone device](https://support.zoom.us/hc/en-us/articles/360021119092).\n\n**Prerequisites:**\n* Pro or a higher account with Zoom Phone license\n* Account owner or admin permissions\n\n**Scopes:** `phone:read:admin`\n\n**Granular Scopes:** `phone:read:device:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", "operationId": "getADevice", "parameters": [ { "name": "deviceId", "in": "path", - "description": "Unique Identifier of the device.", + "description": "The unique Identifier of the device.", "required": true, "schema": { "type": "string", @@ -27078,13 +27094,13 @@ "properties": { "extension_number": { "type": "integer", - "description": "Extension number of the Zoom Phone used by the `user` or `commonArea`.", + "description": "The extension number of the Zoom Phone the `user` or `commonArea` uses.", "format": "int64", "example": 123 }, "id": { "type": "string", - "description": "ID of the user or commonArea to whom the device has been assigned.", + "description": "The ID of the user or common area to whom the device has been assigned.", "example": "i242djsgrg" }, "name": { @@ -27094,11 +27110,11 @@ }, "extension_type": { "type": "string", - "description": "Type of the assignee. Available only if the device is assigned.", + "description": "The type of the assignee. It's available only if the device is assigned.", "example": "user" } }, - "description": "User to whom the device has been assigned." + "description": "The user to whom the device has been assigned." }, "assignees": { "type": "array", @@ -27107,28 +27123,28 @@ "properties": { "extension_number": { "type": "integer", - "description": "Extension number of the Zoom Phone used by the `user` or `commonArea`.", + "description": "The extension number of the Zoom Phone the `user` or `commonArea` uses.", "format": "int64", "example": 123 }, "id": { "type": "string", - "description": "ID of the user or commonArea to whom the device has been assigned.", + "description": "The ID of the user or common area to whom the device has been assigned.", "example": "i242djsgrg" }, "name": { "type": "string", - "description": "Name.", + "description": "The name.", "example": "Pooja" }, "extension_type": { "type": "string", - "description": "Type of the assignee. Available only if the device is assigned.", + "description": "The type of the assignee. It's available only if the device is assigned.", "example": "user" }, "extension_id": { "type": "string", - "description": "Extension ID of the `user` or `common area`.", + "description": "The extension ID of the `user` or `common area`.", "example": "bdkfdler" } } @@ -27136,22 +27152,22 @@ }, "device_type": { "type": "string", - "description": "Includes manufacturer name and the model name.", + "description": "This field includes the manufacturer name and the model name.", "example": "Ribbon EdgeMarc302" }, "display_name": { "type": "string", - "description": "Display name of the device.", + "description": "The display name of the device.", "example": "Pooja's Phone" }, "id": { "type": "string", - "description": "Device ID - Unique identifier of the Device.", + "description": "The unique identifier of the device.", "example": "1234324" }, "mac_address": { "type": "string", - "description": "MAC address or serial number of the device.", + "description": "The MAC address or serial number of the device.", "example": "203a07240534" }, "provision": { @@ -27159,23 +27175,23 @@ "properties": { "sip_accounts": { "type": "array", - "description": "SIP Account details registered during the device provisioning process. This object will only be returned if manual provisioning was used for the device. ", + "description": "The SIP Account details registered during the device provisioning process. This object will only be returned if manual provisioning was used for the device. ", "items": { "type": "object", "properties": { "authorization_id": { "type": "string", - "description": "Authorization ID of the SIP account provided in the provisioning process.", + "description": "The authorization ID of the SIP account provided in the provisioning process.", "example": "123123" }, "outbound_proxy": { "type": "string", - "description": "Outbound proxy provided in the provisioning process.", + "description": "The outbound proxy provided in the provisioning process.", "example": "123123" }, "password": { "type": "string", - "description": "Password entered during the provisioning process. ", + "description": "The password entered during the provisioning process. ", "example": "1123" }, "secondary_outbound_proxy": { @@ -27188,7 +27204,7 @@ "properties": { "alias": { "type": "string", - "description": "Alias.", + "description": "The alias.", "example": "additional information" }, "line_subscription": { @@ -27196,18 +27212,18 @@ "properties": { "display_name": { "type": "string", - "description": "Display name.", + "description": "The display name.", "example": "Pooja" }, "extension_number": { "type": "integer", - "description": "Extension number.", + "description": "The extension number.", "format": "int64", "example": 123123 }, "phone_number": { "type": "string", - "description": "Phone number.", + "description": "The phone number.", "example": "12059535689" } }, @@ -27215,20 +27231,20 @@ }, "outbound_caller_id": { "type": "string", - "description": "Outbound caller ID.", + "description": "The outbound caller ID.", "example": "+123123123" } }, - "description": "Return additional provisioning information with generic device SIP credentials." + "description": "This field returns additional provisioning information with generic device SIP credentials." }, "sip_domain": { "type": "string", - "description": "SIP Domain provided in the provisioning process. \n \n ", + "description": "The SIP domain provided in the provisioning process. \n \n ", "example": "123.zoom.us" }, "user_name": { "type": "string", - "description": "User name of the SIP account provided in the provisioning process.", + "description": "The user name of the SIP account provided in the provisioning process.", "example": "123123" } } @@ -27236,16 +27252,16 @@ }, "type": { "type": "string", - "description": "[Provisioning type](https://support.zoom.us/hc/en-us/articles/360033223411). The value can be one of the following:\n\n* `ztp` : Zero touch provisioning.\n* `assisted`: Assisted provisioning.\n* `manual`: Manual provisioning. \n\n", + "description": "The [provisioning type](https://support.zoom.us/hc/en-us/articles/360033223411). The value can be one of the following:\n\n* `ztp` : Zero touch provisioning.\n* `assisted`: Assisted provisioning.\n* `manual`: Manual provisioning. \n\n", "example": "manual" }, "url": { "type": "string", - "description": "Provisioning URL. This field will only be returned for devices that were provisioned via `assisted` provisioning type.", + "description": "The provisioning URL. This field will only be returned for devices that were provisioned via `assisted` provisioning type.", "example": "wwww.example.com" } }, - "description": "Provisioning information of a device." + "description": "The provisioning information of a device." }, "site": { "type": "object", @@ -27257,20 +27273,56 @@ }, "name": { "type": "string", - "description": "Name of the [site](https://support.zoom.us/hc/en-us/articles/360020809672).", + "description": "The name of the [site](https://support.zoom.us/hc/en-us/articles/360020809672).", "example": "Main Site" } } }, "status": { "type": "string", - "description": "Status of the device. The value is either `online` or `offline`.", + "description": "The status of the device. The value is either `online` or `offline`.", "example": "offline" }, "provision_template_id": { "type": "string", - "description": "Provision template id. Supported only by some devices. Empty string represents 'No value set'", + "description": "The provision template ID. Supported only by some devices. Empty string represents 'No value set'", "example": "Ke5Ghevvoo001hr" + }, + "private_ip": { + "type": "string", + "description": "The private IP of the registered device", + "example": "192.168.10.13" + }, + "public_ip": { + "type": "string", + "description": "The public IP of the registered device", + "example": "220.148.231.126" + }, + "policy": { + "type": "object", + "properties": { + "call_control": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "This field enables the call control feature to the current device. It configures the desk phone devices to enable call control, which allows users to perform desk phone's call control actions from the Zoom desktop client, including making and accepting calls. \nOptions include: \n* `unsupported` \n* `on` \n* `off`", + "example": "off" + } + } + }, + "hot_desking": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "This field enables the hot desking feature to the current device. It lets the guest user sign in to the desk phone. You can't use the desk phone until the guest user signs out. \nOptions include:\n* `unsupported` \n* `on` \n* `off`", + "example": "off" + } + } + } + }, + "description": "The device policy." } } } @@ -27298,6 +27350,7 @@ } ], "x-extensions": { + "x-permissions": [], "x-macro-scopes": [ "phone:read:admin" ], @@ -31114,7 +31167,7 @@ { "name": "owner_type", "in": "query", - "description": "The owner type. \n\nThe allowed values are `null`, `user`, `sharedOfice`, or `callQueue`. \n\nThe default value is `null`. If the value is `null`, it returns all owner types.", + "description": "The owner type. \n\nThe allowed values are `null`, `user`, `sharedOffice`, or `callQueue`. \n\nThe default value is `null`. If the value is `null`, it returns all owner types.", "required": false, "schema": { "type": "string", @@ -34923,6 +34976,222 @@ } } }, + "/phone/sms_campaigns/{smsCampaignId}/phone_numbers/opt_status": { + "get": { + "tags": [ + "SMS Campaign" + ], + "summary": "List opt statuses of phone numbers assigned to SMS campaign", + "description": "Returns the opt statuses of phone numbers that are assigned to SMS the campaign.\n\n**Scopes:** `phone:read:admin`\n\n**Granular Scopes:** `phone:read:sms_campaign_number_opt_status:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId": "getNumberCampaignOptStatus", + "parameters": [ + { + "name": "smsCampaignId", + "in": "path", + "description": "The SMS campaign ID.", + "required": true, + "schema": { + "type": "string", + "example": "C-_2Vkm3BsRoqxybJbP9HqFA" + } + }, + { + "name": "consumer_phone_number", + "in": "query", + "description": "Thw end user's phone number that sends the Opt-in or Opt-out keyword to the Zoom Phone number.", + "required": true, + "schema": { + "type": "string", + "example": "15043449240" + } + }, + { + "name": "zoom_phone_user_numbers", + "in": "query", + "description": "The Zoom users' phone numbers that receive the Opt-in or Opt-out keyword from the end user.", + "required": true, + "schema": { + "maxItems": 10, + "uniqueItems": false, + "type": "array", + "items": { + "type": "string", + "example": "12094436304" + } + } + } + ], + "responses": { + "200": { + "description": "The list of opt statuses for each pair of sender's phone number and receiver's phone number.", + "content": { + "application/json": { + "schema": { + "required": [ + "phone_number_campaign_opt_statuses" + ], + "type": "object", + "properties": { + "phone_number_campaign_opt_statuses": { + "maxItems": 10, + "uniqueItems": false, + "type": "array", + "description": "The list of opt statuses for each number pair.", + "items": { + "required": [ + "consumer_phone_number", + "opt_status", + "zoom_phone_user_number" + ], + "type": "object", + "properties": { + "consumer_phone_number": { + "type": "string", + "description": "The end user's phone number in E164 format that sends the Opt-in or Opt-out keyword to the Zoom Phone number.", + "example": "+15043449240" + }, + "zoom_phone_user_number": { + "type": "string", + "description": "The Zoom user's phone number in E164 format that receives the Opt-in or Opt-out keyword from the end user.", + "example": "+12094436304" + }, + "opt_status": { + "type": "string", + "description": "The opt status.", + "example": "opt_out" + } + }, + "description": "The opt status per a number pair." + } + } + }, + "description": "The list of opt statuses." + } + } + } + }, + "default": { + "description": "For ogen convenient errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "openapi_oauth": [ + "phone:read:admin", + "phone:read:sms_campaign_number_opt_status:admin" + ], + "openapi_authorization": [] + } + ], + "x-extensions": { + "x-permissions": [], + "x-macro-scopes": [ + "phone:read:admin" + ], + "x-granular-scopes": [ + "phone:read:sms_campaign_number_opt_status:admin" + ] + } + }, + "patch": { + "tags": [ + "SMS Campaign" + ], + "summary": "Update opt statuses of phone numbers assigned to SMS campaign", + "description": "Updates opt statuses of phone numbers that are assigned to the SMS campaign.\n\n**Scopes:** `phone:write:admin`\n\n**Granular Scopes:** `phone:update:sms_campaign_number_opt_status:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId": "updateNumberCampaignOptStatus", + "parameters": [ + { + "name": "smsCampaignId", + "in": "path", + "description": "The SMS campaign ID.", + "required": true, + "schema": { + "type": "string", + "example": "C-_2Vkm3BsRoqxybJbP9HqFA" + } + } + ], + "requestBody": { + "description": "This field updates opt statuses of phone numbers that are assigned to the SMS campaign.", + "content": { + "application/json": { + "schema": { + "required": [ + "consumer_phone_number", + "opt_status", + "zoom_phone_user_numbers" + ], + "type": "object", + "properties": { + "consumer_phone_number": { + "type": "string", + "description": "The end user's phone number that sends the Opt-in or Opt-out keyword to the Zoom Phone number.", + "example": "15043449240" + }, + "zoom_phone_user_numbers": { + "maxItems": 10, + "uniqueItems": false, + "type": "array", + "description": "The Zoom users' phone numbers that receive the Opt-in or Opt-out keyword from the end user.", + "items": { + "type": "string", + "example": "12094436304" + } + }, + "opt_status": { + "type": "string", + "description": "The opt status: either `opt_in` or `opt_out`.", + "example": "opt_out" + } + }, + "description": "The request payload to update the opt statuses for phone numbers that are assigned to the SMS campaign." + } + } + } + }, + "responses": { + "204": { + "description": "Update opt status for each pair of sender's phone number and receiver's phone number." + }, + "default": { + "description": "For ogen convenient errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "openapi_oauth": [ + "phone:write:admin", + "phone:update:sms_campaign_number_opt_status:admin" + ], + "openapi_authorization": [] + } + ], + "x-extensions": { + "x-permissions": [], + "x-macro-scopes": [ + "phone:write:admin" + ], + "x-granular-scopes": [ + "phone:update:sms_campaign_number_opt_status:admin" + ] + } + } + }, "/phone/sms_campaigns/{smsCampaignId}/phone_numbers/{phoneNumberId}": { "delete": { "tags": [ @@ -45982,7 +46251,7 @@ "Users" ], "summary": "Get a user's profile settings", - "description": "Gets the Zoom Phone [profile settings](https://support.zoom.us/hc/en-us/articles/360021325712-Configuring-Settings) of a user. For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `userId` parameter.\n\n**Prerequisites:** \n* A Business or Enterprise account \n* A Zoom Phone license\n\n**Scopes:** `phone:read:admin`,`phone:read`\n\n**Granular Scopes:** `phone:read:user_setting:admin`,`phone:read:user_setting`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`", + "description": "Returns the Zoom Phone [profile settings](https://support.zoom.us/hc/en-us/articles/360021325712-Configuring-Settings) of a user. For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `userId` parameter.\n\n**Prerequisites:** \n* A Business or Enterprise account \n* A Zoom Phone license\n\n**Scopes:** `phone:read`,`phone:read:admin`\n\n**Granular Scopes:** `phone:read:user_setting:admin`,`phone:read:user_setting`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", "operationId": "phoneUserSettings", "parameters": [ { @@ -46024,7 +46293,7 @@ "properties": { "code": { "type": "string", - "description": "Two lettered country [code](https://marketplace.zoom.us/docs/api-reference/other-references/abbreviation-lists#countries).", + "description": "The two lettered country [code](https://marketplace.zoom.us/docs/api-reference/other-references/abbreviation-lists#countries).", "example": "US" }, "country_code": { @@ -46056,18 +46325,18 @@ }, "extension_id": { "type": "string", - "description": "The extension ID.", + "description": "The extension's ID.", "example": "CcrEGgmeQem1uyJsuIRKwA" }, "extension_number": { "type": "integer", - "description": "The extension number.", + "description": "The extension's number.", "format": "int64", "example": 1000123477 }, "extension_type": { "type": "string", - "description": "The extension type: `user` or `commonArea`.", + "description": "The extension's type: `user` or `commonArea`.", "example": "user" }, "id": { @@ -46153,6 +46422,21 @@ "type": "string", "description": "The status of the device: `online` or `offline`.", "example": "online" + }, + "mac_address": { + "type": "string", + "description": "The MAC address or serial number of the device.", + "example": "203a07240534" + }, + "private_ip": { + "type": "string", + "description": "The private IP of the registered device.", + "example": "192.168.10.13" + }, + "public_ip": { + "type": "string", + "description": "The public IP of the registered device.", + "example": "220.148.231.126" } } } @@ -46169,7 +46453,7 @@ }, "phone_screen_lock": { "type": "boolean", - "description": "After enabling this option, you can lock your desk phone screen. PIN Code is required to unlock your phone. This feature is not supported on some devices. See [Supported Device Types](https://support.zoom.us/hc/en-us/articles/360029698771) for more information.", + "description": "After enabling this option, you can lock your desk phone screen. A PIN code is required to unlock your phone. This feature is not supported on some devices. See [Supported Device Types](https://support.zoom.us/hc/en-us/articles/360029698771) for more information.", "example": true }, "pin_code": { @@ -46214,12 +46498,12 @@ }, "name": { "type": "string", - "description": "The outbound caller name.", + "description": "The outbound caller's name.", "example": "Outbound caller name." }, "number": { "type": "string", - "description": "The outbound caller number.", + "description": "The outbound caller's number.", "example": "+2097392651" } } @@ -46274,22 +46558,22 @@ "properties": { "extension_id": { "type": "string", - "description": "The extension ID.", + "description": "The extension's ID.", "example": "52OdSKGSSS-EOyJwQncFvA" }, "extension_number": { "type": "string", - "description": "The extension number.", + "description": "The extension's number.", "example": "1000001004" }, "extension_type": { "type": "string", - "description": "The extension type: `user` or `commonArea`.", + "description": "The extension's type: `user` or `commonArea`.", "example": "user" }, "display_name": { "type": "string", - "description": "The display name.", + "description": "The display's name.", "example": "test name" }, "status": { @@ -46315,12 +46599,12 @@ "properties": { "id": { "type": "string", - "description": "The device ID.", + "description": "The device's ID.", "example": "JHwOJZ_PRICfVhQlL0x_ww" }, "name": { "type": "string", - "description": "The device name.", + "description": "The device's name.", "example": "Sita's Phone" } }, @@ -46426,8 +46710,8 @@ "security": [ { "openapi_oauth": [ - "phone:read:admin", "phone:read", + "phone:read:admin", "phone:read:user_setting:admin", "phone:read:user_setting" ], @@ -46437,8 +46721,8 @@ "x-extensions": { "x-permissions": [], "x-macro-scopes": [ - "phone:read:admin", - "phone:read" + "phone:read", + "phone:read:admin" ], "x-granular-scopes": [ "phone:read:user_setting:admin", @@ -50363,6 +50647,8 @@ "phone:read:list_sms_campaigns:admin": "phone:read:list_sms_campaigns:admin", "phone:read:sms_campaign:admin": "phone:read:sms_campaign:admin", "phone:write:sms_campaign_number:admin": "phone:write:sms_campaign_number:admin", + "phone:read:sms_campaign_number_opt_status:admin": "phone:read:sms_campaign_number_opt_status:admin", + "phone:update:sms_campaign_number_opt_status:admin": "phone:update:sms_campaign_number_opt_status:admin", "phone:delete:sms_campaign_number:admin": "phone:delete:sms_campaign_number:admin", "phone:write:setting_template:admin": "phone:write:setting_template:admin", "phone:read:list_setting_templates:admin": "phone:read:list_setting_templates:admin", diff --git a/spec/ZoomUserAPISpec.json b/spec/ZoomUserAPISpec.json index e8d67b2..ac2097d 100644 --- a/spec/ZoomUserAPISpec.json +++ b/spec/ZoomUserAPISpec.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "Zoom User API", - "description": "Zoom User Open APIs", + "description": "The User APIs allow developers to programatically access data related to users, groups, and contact groups.", "termsOfService": "https://zoom.us/docs/en-us/zoom_api_license_and_tou.html", "contact": { "name": "Zoom Developers", @@ -573,9 +573,22 @@ "Contact Groups" ], "summary": "Add contact group members", - "description": "Use this API to add members to a [contact group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management).\n\n**Prerequisite**: Pro or higher account. \n \n\n**Scopes:** `contact_group:write:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`", + "description": "Use this API to add members to a [contact group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management).\n\n**Prerequisite**: Pro or higher account. \n \n\n**Scopes:** `contact_group:write:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `HEAVY`", "operationId": "contactGroupMemberAdd", + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "The contact group ID.\nRetrieve by calling the List contact groups API.", + "required": true, + "schema": { + "type": "string", + "example": "dir.JquKVDGlQ9K6S0QVWGcysw" + } + } + ], "requestBody": { + "description": "Add contact group members", "content": { "application/json": { "schema": { @@ -583,6 +596,7 @@ "properties": { "group_members": { "type": "array", + "description": "Group members array", "items": { "type": "object", "properties": { @@ -611,17 +625,18 @@ "content": { "application/json": { "schema": { + "type": "object", "properties": { "member_ids": { "type": "array", + "description": "Member ids array", "items": { "type": "string", "description": "The member ID of the member that is added successfully.", "example": "KT6h5SfCSm6YNjZo7i8few" } } - }, - "type": "object" + } } } } @@ -646,49 +661,38 @@ } ], "x-extensions": { + "x-permissions": [], "x-macro-scopes": [ "contact_group:write:admin" ] - }, - "parameters": [ - { - "name": "groupId", - "in": "path", - "description": "The group ID.", - "required": true, - "schema": { - "type": "string", - "example": "A4ql1FjgL913r" - } - } - ] + } }, "delete": { "tags": [ "Contact Groups" ], "summary": "Remove members in a contact group", - "description": "Use this API to remove members in a [contact group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-).\n\n**Prerequisite**: Pro or higher account. \n \n\n**Scopes:** `contact_group:write:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`", + "description": "Removes members in a [contact group](https://support.zoom.us/hc/en-us/articles/204519819-Group-Management-).\n\n**Prerequisite**: Pro or higher account. \n \n\n**Scopes:** `contact_group:write:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `HEAVY`", "operationId": "contactGroupMemberRemove", "parameters": [ { - "name": "member_ids", - "in": "query", - "description": "The member's ID in a contact group. Use commas (,) to separate a maximum of 20 ids. \n \nCan be retrieved by calling the [**List contact groups**](/docs/api-reference/zoom-api/methods#operation/contactGroupMembers) API.", + "name": "groupId", + "in": "path", + "description": "The contact group ID.\nRetrieve by calling the List contact groups API.", "required": true, "schema": { "type": "string", - "example": "n22T5G6bQDCugVm1V59TAQ" + "example": "dir.JquKVDGlQ9K6S0QVWGcysw" } }, { - "name": "groupId", - "in": "path", - "description": "The group ID.", + "name": "member_ids", + "in": "query", + "description": "The member's ID in a contact group. Use commas (,) to separate a maximum of 20 ids. \n \nCan be retrieved by calling the [**List contact groups**](/docs/api-reference/zoom-api/methods#operation/contactGroupMembers) API.", "required": true, "schema": { "type": "string", - "example": "A4ql1FjgL913r" + "example": "n22T5G6bQDCugVm1V59TAQ" } } ], @@ -716,6 +720,7 @@ } ], "x-extensions": { + "x-permissions": [], "x-macro-scopes": [ "contact_group:write:admin" ] @@ -7696,7 +7701,7 @@ "description": "The number of records returned within a single API call.", "required": false, "schema": { - "maximum": 300, + "maximum": 2000, "type": "integer", "example": 30, "default": 30 @@ -7778,7 +7783,7 @@ "default": 1 }, "page_size": { - "maximum": 300, + "maximum": 2000, "type": "integer", "description": "The number of records returned within a single API call.", "example": 30, @@ -7790,6 +7795,7 @@ "example": 8482 }, "users": { + "maxItems": 2000, "type": "array", "description": "The information about the users.", "items": { @@ -8268,6 +8274,7 @@ "example": "1" }, "users": { + "maxItems": 30, "type": "array", "description": "The users' info you want to update.", "items": { @@ -8300,6 +8307,7 @@ "type": "object", "properties": { "success_user_ids": { + "maxItems": 30, "type": "array", "description": "The IDs of users for whom the feature was updated successfully", "items": { @@ -8308,12 +8316,14 @@ } }, "fail_details": { + "maxItems": 30, "type": "array", "description": "The details why these users' feature was not updated successfully.", "items": { "type": "object", "properties": { "user_ids": { + "maxItems": 30, "type": "array", "description": "The IDs of users for whom the feature was not updated successfully.", "items": { @@ -8436,7 +8446,7 @@ "Users" ], "summary": "Get user summary", - "description": "Use this API to get a summary of users, including the number and types of users in the account.\n\n \n\n**Scopes:** `user:read`,`user:write`,`user:read:admin`,`user:write:admin`\n\n**Granular Scopes:** `user:read:summary:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`", + "description": "Gets a summary of users, including the number and types of users in the account.\n\n \n\n**Scopes:** `user:read`,`user:write`,`user:read:admin`,`user:write:admin`\n\n**Granular Scopes:** `user:read:summary:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `MEDIUM`", "operationId": "userSummary", "responses": { "200": { @@ -9217,6 +9227,7 @@ "example": "Example, Inc." }, "custom_attributes": { + "maxItems": 5, "type": "array", "description": "The user's assigned custom attributes.", "items": { @@ -9305,6 +9316,7 @@ "deprecated": true }, "phone_numbers": { + "maxItems": 3, "type": "array", "description": "The information about the user's assigned phone numbers.", "items": { @@ -9556,7 +9568,7 @@ "Users" ], "summary": "Add assistants", - "description": "Assign assistants to a user. In the request body, provide either the user's ID or the user's email address. For user-level apps, pass [the `me` value](https://developers.zoom.us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the `userId` parameter.\n\nAssistants are the users to whom the current user has assigned [scheduling privilege](https://support.zoom.us/hc/en-us/articles/201362803-Scheduling-Privilege). Assistants can schedule meetings on behalf of the current user, and can also manage and act as an alternative host for all meetings if the admin has enabled the [co-host option](https://zoom.us/account/setting) on the account.\n\n**Prerequisites:** \n* The user as well as the assistant must have Licensed or an On-prem license.\n* Assistants must be under the current user's account, or the assistants' account must be in the same organization as the current user's account.\n\n**Scopes:** `user:write:admin`,`user:write`\n\n**Granular Scopes:** `user:write:assistant`,`user:write:assistant:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`", + "description": "Assign assistants to a user. In the request body, provide either the user's ID or the user's email address. For user-level apps, pass [the `me` value](https://developers.zoom.us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the `userId` parameter.\n\nAssistants are the users to whom the current user has assigned [scheduling privilege](https://support.zoom.us/hc/en-us/articles/201362803-Scheduling-Privilege). Assistants can schedule meetings on behalf of the current user, and can also manage and act as an alternative host for all meetings if the admin has enabled the [co-host option](https://zoom.us/account/setting) on the account.\n\n**Prerequisites:** \n* The user as well as the assistant must have Licensed or an On-prem license.\n* Assistants must be under the current user's account, or the assistants' account must be in the same organization as the current user's account.\n\n**Scopes:** `user:write:admin`,`user:write`\n\n**Granular Scopes:** `user:write:assistant`,`user:write:assistant:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `MEDIUM`", "operationId": "userAssistantCreate", "parameters": [ { @@ -9578,6 +9590,7 @@ "type": "object", "properties": { "assistants": { + "maxItems": 30, "type": "array", "description": "List of user's assistants.", "items": { @@ -9594,8 +9607,7 @@ "example": "KDcuGIm1QgePTO8WbOqwIQ" } } - }, - "maxItems": 30 + } } }, "description": "List of user's assistants." @@ -11337,6 +11349,7 @@ "example": true }, "zoom_events_unlimited_capacities": { + "maxItems": 9, "type": "array", "description": "The capacity list of user's Zoom Events Unlimited plan - `100`, `500`, `1000`, `3000`, `5000`, `10000`, `20000`, `30000`, or `50000`. The first entry is always the largest.", "example": [ @@ -11354,6 +11367,7 @@ "example": true }, "zoom_sessions_unlimited_capacities": { + "maxItems": 9, "type": "array", "description": "The capacity list of user's Zoom Sessions Unlimited plan - `100`, `500`, `1000`, `3000`, `5000`, `10000`, `20000`, `30000`, or `50000`. The first entry is always the largest.", "example": [ @@ -13197,6 +13211,7 @@ "example": true }, "zoom_events_unlimited_capacities": { + "maxItems": 9, "type": "array", "description": "The capacity list of user's Zoom Events Unlimited plan: `100`, `500`, `1000`, `3000`, `5000`, `10000`, `20000`, `30000`, or `50000`.", "example": [ @@ -13214,6 +13229,7 @@ "example": true }, "zoom_sessions_unlimited_capacities": { + "maxItems": 9, "type": "array", "description": "The capacity list of user's Zoom Sessions Unlimited plan: `100`, `500`, `1000`, `3000`, `5000`, `10000`, `20000`, `30000`, or `50000`.", "example": [ @@ -14998,7 +15014,7 @@ "Users" ], "summary": "Get a user's token", - "description": "Get a user's Zoom token or Zoom Access Key (ZAK). For user-level apps, pass [the `me` value](https://developers.zoom.us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the `userId` parameter. \n\n \n\n**Scopes:** `user:read`,`user:write`,`user:read:admin`,`user:write:admin`,`user_profile`\n\n**Granular Scopes:** `user:read:token`,`user:read:token:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`", + "description": "Gets a user's Zoom token or Zoom Access Key (ZAK). For user-level apps, pass [the `me` value](https://developers.zoom.us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the `userId` parameter. \n\n \n\n**Scopes:** `user:read`,`user:write`,`user:read:admin`,`user:write:admin`,`user_profile`\n\n**Granular Scopes:** `user:read:token`,`user:read:token:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", "operationId": "userToken", "parameters": [ { @@ -15099,7 +15115,7 @@ "Users" ], "summary": "Revoke a user's SSO token", - "description": "Revoke a user's SSO token. For user-level apps, pass [the `me` value](https://developers.zoom.us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the `userId` parameter.\n\nAfter calling this API, the SSO user will be logged out of their current Zoom session.\n\n\n\n**Scopes:** `user:write:admin`,`user:write`\n\n**Granular Scopes:** `user:delete:token`,`user:delete:token:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`", + "description": "Revokes a user's SSO token. For user-level apps, pass [the `me` value](https://developers.zoom.us/docs/api/rest/using-zoom-apis/#the-me-keyword) instead of the `userId` parameter.\n\nAfter calling this API, the SSO user will be logged out of their current Zoom session.\n\n\n\n**Scopes:** `user:write:admin`,`user:write`\n\n**Granular Scopes:** `user:delete:token`,`user:delete:token:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", "operationId": "userSSOTokenDelete", "parameters": [ {