|
39 | 39 | _ = namegenerator.GetRandomName |
40 | 40 | ) |
41 | 41 |
|
| 42 | +type DomainLastStatusAutoconfigStateReason string |
| 43 | + |
| 44 | +const ( |
| 45 | + // If not specified, the auto-configuration state is unknown by default. |
| 46 | + DomainLastStatusAutoconfigStateReasonUnknownReason = DomainLastStatusAutoconfigStateReason("unknown_reason") |
| 47 | + // The token doesn't have the necessary permissions to manage the domain's DNS records. |
| 48 | + DomainLastStatusAutoconfigStateReasonPermissionDenied = DomainLastStatusAutoconfigStateReason("permission_denied") |
| 49 | + // The domain does not exist or isn't manageable by the token. |
| 50 | + DomainLastStatusAutoconfigStateReasonDomainNotFound = DomainLastStatusAutoconfigStateReason("domain_not_found") |
| 51 | +) |
| 52 | + |
| 53 | +func (enum DomainLastStatusAutoconfigStateReason) String() string { |
| 54 | + if enum == "" { |
| 55 | + // return default value if empty |
| 56 | + return "unknown_reason" |
| 57 | + } |
| 58 | + return string(enum) |
| 59 | +} |
| 60 | + |
| 61 | +func (enum DomainLastStatusAutoconfigStateReason) Values() []DomainLastStatusAutoconfigStateReason { |
| 62 | + return []DomainLastStatusAutoconfigStateReason{ |
| 63 | + "unknown_reason", |
| 64 | + "permission_denied", |
| 65 | + "domain_not_found", |
| 66 | + } |
| 67 | +} |
| 68 | + |
| 69 | +func (enum DomainLastStatusAutoconfigStateReason) MarshalJSON() ([]byte, error) { |
| 70 | + return []byte(fmt.Sprintf(`"%s"`, enum)), nil |
| 71 | +} |
| 72 | + |
| 73 | +func (enum *DomainLastStatusAutoconfigStateReason) UnmarshalJSON(data []byte) error { |
| 74 | + tmp := "" |
| 75 | + |
| 76 | + if err := json.Unmarshal(data, &tmp); err != nil { |
| 77 | + return err |
| 78 | + } |
| 79 | + |
| 80 | + *enum = DomainLastStatusAutoconfigStateReason(DomainLastStatusAutoconfigStateReason(tmp).String()) |
| 81 | + return nil |
| 82 | +} |
| 83 | + |
42 | 84 | type DomainLastStatusRecordStatus string |
43 | 85 |
|
44 | 86 | const ( |
@@ -769,6 +811,19 @@ type Email struct { |
769 | 811 | Flags []EmailFlag `json:"flags"` |
770 | 812 | } |
771 | 813 |
|
| 814 | +// DomainLastStatusAutoconfigState: domain last status autoconfig state. |
| 815 | +type DomainLastStatusAutoconfigState struct { |
| 816 | + // Enabled: enable or disable the auto-configuration of domain DNS records. |
| 817 | + Enabled bool `json:"enabled"` |
| 818 | + |
| 819 | + // Autoconfigurable: whether the domain can be auto-configured or not. |
| 820 | + Autoconfigurable bool `json:"autoconfigurable"` |
| 821 | + |
| 822 | + // Reason: the reason that the domain cannot be auto-configurable. |
| 823 | + // Default value: unknown_reason |
| 824 | + Reason *DomainLastStatusAutoconfigStateReason `json:"reason"` |
| 825 | +} |
| 826 | + |
772 | 827 | // DomainLastStatusDkimRecord: domain last status dkim record. |
773 | 828 | type DomainLastStatusDkimRecord struct { |
774 | 829 | // Status: status of the DKIM record's configuration. |
@@ -952,11 +1007,11 @@ type UpdateProjectSettingsRequestUpdatePeriodicReport struct { |
952 | 1007 | // Enabled: (Optional) Enable or disable periodic report notifications. |
953 | 1008 | Enabled *bool `json:"enabled"` |
954 | 1009 |
|
955 | | - // Frequency: (Optional) At which frequency you receive periodic report notifications. |
| 1010 | + // Frequency: (Optional) Frequency at which you receive periodic report notifications. |
956 | 1011 | // Default value: unknown_frequency |
957 | 1012 | Frequency *ProjectSettingsPeriodicReportFrequency `json:"frequency"` |
958 | 1013 |
|
959 | | - // SendingHour: (Optional) At which hour you receive periodic report notifications. |
| 1014 | + // SendingHour: (Optional) Hour at which you receive periodic report notifications. |
960 | 1015 | SendingHour *uint32 `json:"sending_hour"` |
961 | 1016 |
|
962 | 1017 | // SendingDay: (Optional) On which day you receive periodic report notifications (1-7 weekly, 1-28 monthly). |
@@ -1090,6 +1145,9 @@ type DomainLastStatus struct { |
1090 | 1145 |
|
1091 | 1146 | // DmarcRecord: the DMARC record verification data. |
1092 | 1147 | DmarcRecord *DomainLastStatusDmarcRecord `json:"dmarc_record"` |
| 1148 | + |
| 1149 | + // AutoconfigState: the verification state of domain auto-configuration. |
| 1150 | + AutoconfigState *DomainLastStatusAutoconfigState `json:"autoconfig_state"` |
1093 | 1151 | } |
1094 | 1152 |
|
1095 | 1153 | // GetDomainLastStatusRequest: get domain last status request. |
|
0 commit comments