feat(accounts): add consent settings and organization management

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 13:00:39 +03:00
1 parent 24638d46d2
commit 391af7a1ef
83 files changed
+10198 -613

No files matched your search

@@ -12492,6 +12492,172 @@ func (s *ConfirmEmailForbidden) UnmarshalJSON(data []byte) error {
return s.Decode(d)
}
// Encode implements json.Marshaler.
func (s *ConsentDeletionRequest) Encode(e *jx.Encoder) {
e.ObjStart()
s.encodeFields(e)
e.ObjEnd()
}
// encodeFields encodes fields.
func (s *ConsentDeletionRequest) encodeFields(e *jx.Encoder) {
{
e.FieldStart("id")
json.EncodeUUID(e, s.ID)
}
{
e.FieldStart("status")
s.Status.Encode(e)
}
{
e.FieldStart("requested_at")
s.RequestedAt.Encode(e)
}
}
var jsonFieldsNameOfConsentDeletionRequest = [3]string{
0: "id",
1: "status",
2: "requested_at",
}
// Decode decodes ConsentDeletionRequest from json.
func (s *ConsentDeletionRequest) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode ConsentDeletionRequest to nil")
}
var requiredBitSet [1]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
case "id":
requiredBitSet[0] |= 1 << 0
if err := func() error {
v, err := json.DecodeUUID(d)
s.ID = v
if err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"id\"")
}
case "status":
requiredBitSet[0] |= 1 << 1
if err := func() error {
if err := s.Status.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"status\"")
}
case "requested_at":
requiredBitSet[0] |= 1 << 2
if err := func() error {
if err := s.RequestedAt.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"requested_at\"")
}
default:
return errors.Errorf("unexpected field %q", k)
}
return nil
}); err != nil {
return errors.Wrap(err, "decode ConsentDeletionRequest")
}
// 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(jsonFieldsNameOfConsentDeletionRequest) {
name = jsonFieldsNameOfConsentDeletionRequest[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 *ConsentDeletionRequest) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *ConsentDeletionRequest) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes ConsentDeletionRequestStatus as json.
func (s ConsentDeletionRequestStatus) Encode(e *jx.Encoder) {
e.Str(string(s))
}
// Decode decodes ConsentDeletionRequestStatus from json.
func (s *ConsentDeletionRequestStatus) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode ConsentDeletionRequestStatus to nil")
}
v, err := d.StrBytes()
if err != nil {
return err
}
// Try to use constant string.
switch ConsentDeletionRequestStatus(v) {
case ConsentDeletionRequestStatusRequested:
*s = ConsentDeletionRequestStatusRequested
case ConsentDeletionRequestStatusProcessing:
*s = ConsentDeletionRequestStatusProcessing
default:
*s = ConsentDeletionRequestStatus(v)
}
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s ConsentDeletionRequestStatus) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *ConsentDeletionRequestStatus) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode implements json.Marshaler.
func (s *ConsentOrganization) Encode(e *jx.Encoder) {
e.ObjStart()
@@ -12605,44 +12771,6 @@ func (s *ConsentOrganization) UnmarshalJSON(data []byte) error {
return s.Decode(d)
}
// Encode encodes ConsentPurpose as json.
func (s ConsentPurpose) Encode(e *jx.Encoder) {
e.Str(string(s))
}
// Decode decodes ConsentPurpose from json.
func (s *ConsentPurpose) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode ConsentPurpose to nil")
}
v, err := d.StrBytes()
if err != nil {
return err
}
// Try to use constant string.
switch ConsentPurpose(v) {
case ConsentPurposeC1:
*s = ConsentPurposeC1
default:
*s = ConsentPurpose(v)
}
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s ConsentPurpose) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *ConsentPurpose) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes ConsentPurposeCode as json.
func (s ConsentPurposeCode) Encode(e *jx.Encoder) {
e.Str(string(s))
@@ -13135,6 +13263,147 @@ func (s *ConsentRevocationSource) UnmarshalJSON(data []byte) error {
return s.Decode(d)
}
// Encode implements json.Marshaler.
func (s *ConsentSettingsGrantRequest) Encode(e *jx.Encoder) {
e.ObjStart()
s.encodeFields(e)
e.ObjEnd()
}
// encodeFields encodes fields.
func (s *ConsentSettingsGrantRequest) encodeFields(e *jx.Encoder) {
{
e.FieldStart("text_version")
s.TextVersion.Encode(e)
}
{
e.FieldStart("accepted")
s.Accepted.Encode(e)
}
}
var jsonFieldsNameOfConsentSettingsGrantRequest = [2]string{
0: "text_version",
1: "accepted",
}
// Decode decodes ConsentSettingsGrantRequest from json.
func (s *ConsentSettingsGrantRequest) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode ConsentSettingsGrantRequest to nil")
}
var requiredBitSet [1]uint8
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
case "text_version":
requiredBitSet[0] |= 1 << 0
if err := func() error {
if err := s.TextVersion.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"text_version\"")
}
case "accepted":
requiredBitSet[0] |= 1 << 1
if err := func() error {
if err := s.Accepted.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"accepted\"")
}
default:
return errors.Errorf("unexpected field %q", k)
}
return nil
}); err != nil {
return errors.Wrap(err, "decode ConsentSettingsGrantRequest")
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [1]uint8{
0b00000011,
} {
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(jsonFieldsNameOfConsentSettingsGrantRequest) {
name = jsonFieldsNameOfConsentSettingsGrantRequest[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 *ConsentSettingsGrantRequest) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *ConsentSettingsGrantRequest) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes ConsentSettingsGrantRequestAccepted as json.
func (s ConsentSettingsGrantRequestAccepted) Encode(e *jx.Encoder) {
e.Bool(bool(s))
}
// Decode decodes ConsentSettingsGrantRequestAccepted from json.
func (s *ConsentSettingsGrantRequestAccepted) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode ConsentSettingsGrantRequestAccepted to nil")
}
v, err := d.Bool()
if err != nil {
return err
}
*s = ConsentSettingsGrantRequestAccepted(v)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s ConsentSettingsGrantRequestAccepted) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *ConsentSettingsGrantRequestAccepted) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes ConsentSource as json.
func (s ConsentSource) Encode(e *jx.Encoder) {
e.Str(string(s))
@@ -17436,6 +17705,82 @@ func (s *GetMyCardPreviewUnauthorized) UnmarshalJSON(data []byte) error {
return s.Decode(d)
}
// Encode encodes GetMyConsentTextBadRequest as json.
func (s *GetMyConsentTextBadRequest) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes GetMyConsentTextBadRequest from json.
func (s *GetMyConsentTextBadRequest) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode GetMyConsentTextBadRequest to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = GetMyConsentTextBadRequest(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *GetMyConsentTextBadRequest) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GetMyConsentTextBadRequest) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes GetMyConsentTextUnauthorized as json.
func (s *GetMyConsentTextUnauthorized) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes GetMyConsentTextUnauthorized from json.
func (s *GetMyConsentTextUnauthorized) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode GetMyConsentTextUnauthorized to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = GetMyConsentTextUnauthorized(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *GetMyConsentTextUnauthorized) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GetMyConsentTextUnauthorized) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes GetMyInvitationBadRequest as json.
func (s *GetMyInvitationBadRequest) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
@@ -18582,6 +18927,120 @@ func (s *GradeCode) UnmarshalJSON(data []byte) error {
return s.Decode(d)
}
// Encode encodes GrantMyConsentBadRequest as json.
func (s *GrantMyConsentBadRequest) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes GrantMyConsentBadRequest from json.
func (s *GrantMyConsentBadRequest) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode GrantMyConsentBadRequest to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = GrantMyConsentBadRequest(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *GrantMyConsentBadRequest) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GrantMyConsentBadRequest) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes GrantMyConsentForbidden as json.
func (s *GrantMyConsentForbidden) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes GrantMyConsentForbidden from json.
func (s *GrantMyConsentForbidden) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode GrantMyConsentForbidden to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = GrantMyConsentForbidden(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *GrantMyConsentForbidden) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GrantMyConsentForbidden) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes GrantMyConsentUnauthorized as json.
func (s *GrantMyConsentUnauthorized) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes GrantMyConsentUnauthorized from json.
func (s *GrantMyConsentUnauthorized) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode GrantMyConsentUnauthorized to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = GrantMyConsentUnauthorized(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *GrantMyConsentUnauthorized) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *GrantMyConsentUnauthorized) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode implements json.Marshaler.
func (s *HealthResponse) Encode(e *jx.Encoder) {
e.ObjStart()
@@ -43764,6 +44223,82 @@ func (s *RegistrationRequest) UnmarshalJSON(data []byte) error {
return s.Decode(d)
}
// Encode encodes RequestMyAccountDeletionForbidden as json.
func (s *RequestMyAccountDeletionForbidden) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes RequestMyAccountDeletionForbidden from json.
func (s *RequestMyAccountDeletionForbidden) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode RequestMyAccountDeletionForbidden to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = RequestMyAccountDeletionForbidden(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *RequestMyAccountDeletionForbidden) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RequestMyAccountDeletionForbidden) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes RequestMyAccountDeletionUnauthorized as json.
func (s *RequestMyAccountDeletionUnauthorized) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes RequestMyAccountDeletionUnauthorized from json.
func (s *RequestMyAccountDeletionUnauthorized) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode RequestMyAccountDeletionUnauthorized to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = RequestMyAccountDeletionUnauthorized(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *RequestMyAccountDeletionUnauthorized) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RequestMyAccountDeletionUnauthorized) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes ResendEmailVerificationBadRequest as json.
func (s *ResendEmailVerificationBadRequest) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
@@ -43840,6 +44375,158 @@ func (s *ResendEmailVerificationForbidden) UnmarshalJSON(data []byte) error {
return s.Decode(d)
}
// Encode encodes RevokeMyConsentForbidden as json.
func (s *RevokeMyConsentForbidden) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes RevokeMyConsentForbidden from json.
func (s *RevokeMyConsentForbidden) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode RevokeMyConsentForbidden to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = RevokeMyConsentForbidden(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *RevokeMyConsentForbidden) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RevokeMyConsentForbidden) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes RevokeMyConsentUnauthorized as json.
func (s *RevokeMyConsentUnauthorized) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes RevokeMyConsentUnauthorized from json.
func (s *RevokeMyConsentUnauthorized) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode RevokeMyConsentUnauthorized to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = RevokeMyConsentUnauthorized(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *RevokeMyConsentUnauthorized) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RevokeMyConsentUnauthorized) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes RevokeMyOrganizationContactConsentForbidden as json.
func (s *RevokeMyOrganizationContactConsentForbidden) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes RevokeMyOrganizationContactConsentForbidden from json.
func (s *RevokeMyOrganizationContactConsentForbidden) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode RevokeMyOrganizationContactConsentForbidden to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = RevokeMyOrganizationContactConsentForbidden(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *RevokeMyOrganizationContactConsentForbidden) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RevokeMyOrganizationContactConsentForbidden) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes RevokeMyOrganizationContactConsentUnauthorized as json.
func (s *RevokeMyOrganizationContactConsentUnauthorized) Encode(e *jx.Encoder) {
unwrapped := (*Problem)(s)
unwrapped.Encode(e)
}
// Decode decodes RevokeMyOrganizationContactConsentUnauthorized from json.
func (s *RevokeMyOrganizationContactConsentUnauthorized) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode RevokeMyOrganizationContactConsentUnauthorized to nil")
}
var unwrapped Problem
if err := func() error {
if err := unwrapped.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "alias")
}
*s = RevokeMyOrganizationContactConsentUnauthorized(unwrapped)
return nil
}
// MarshalJSON implements stdjson.Marshaler.
func (s *RevokeMyOrganizationContactConsentUnauthorized) MarshalJSON() ([]byte, error) {
e := jx.Encoder{}
s.Encode(&e)
return e.Bytes(), nil
}
// UnmarshalJSON implements stdjson.Unmarshaler.
func (s *RevokeMyOrganizationContactConsentUnauthorized) UnmarshalJSON(data []byte) error {
d := jx.DecodeBytes(data)
return s.Decode(d)
}
// Encode encodes RubAmount as json.
func (s RubAmount) Encode(e *jx.Encoder) {
unwrapped := int64(s)