1/* 2Copyright 2018 Comcast Cable Communications Management, LLC 3Licensed under the Apache License, Version 2.0 (the "License"); 4you may not use this file except in compliance with the License. 5You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6Unless required by applicable law or agreed to in writing, software 7distributed under the License is distributed on an "AS IS" BASIS, 8WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 9See the License for the specific language governing permissions and 10limitations under the License. 11*/ 12 13package vinyldns 14 15// BatchRecordChanges represents a list of record changes, 16// as returned by the list batch changes VinylDNS API endpoint. 17type BatchRecordChanges struct { 18 BatchChanges []RecordChange `json:"batchChanges,omitempty"` 19} 20 21// RecordChange represents an individual batch record change. 22type RecordChange struct { 23 ID string `json:"id,omitempty"` 24 Status string `json:"status,omitempty"` 25 ChangeType string `json:"changeType,omitempty"` 26 RecordName string `json:"recordName,omitempty"` 27 TTL int `json:"ttl,omitempty"` 28 Type string `json:"type,omitempty"` 29 ZoneName string `json:"zoneName,omitempty"` 30 InputName string `json:"inputName,omitempty"` 31 ZoneID string `json:"zoneId,omitempty"` 32 TotalChanges int `json:"totalChanges,omitempty"` 33 UserName string `json:"userName,omitempty"` 34 Comments string `json:"comments,omitempty"` 35 UserID string `json:"userId,omitempty"` 36 CreatedTimestamp string `json:"createdTimestamp,omitempty"` 37 Record RecordData `json:"record,omitempty"` 38 OwnerGroupID string `json:"ownerGroupId,omitempty"` 39} 40 41// BatchRecordChangeUpdateResponse is represents a batch record change create or update response 42type BatchRecordChangeUpdateResponse struct { 43 ID string `json:"id,omitempty"` 44 UserName string `json:"userName,omitempty"` 45 UserID string `json:"userId,omitempty"` 46 Status string `json:"status,omitempty"` 47 Comments string `json:"comments,omitempty"` 48 CreatedTimestamp string `json:"createdTimestamp,omitempty"` 49 OwnerGroupID string `json:"ownerGroupId,omitempty"` 50 Changes []RecordChange `json:"changes,omitempty"` 51 ApprovalStatus string `json:"approvalStatus,omitempty"` 52 ReviewerID string `json:"reviewerId,omitempty"` 53 ReviewerUserName string `json:"reviewerUserName,omitempty"` 54 ReviewComment string `json:"reviewComment,omitempty"` 55 ReviewTimestamp string `json:"reviewTimestamp,omitempty"` 56 ScheduledTime string `json:"scheduledTime,omitempty"` 57 CancelledTimestamp string `json:"cancelledTimestamp,omitempty"` 58} 59 60// RecordData is represents a batch record change record data. 61type RecordData struct { 62 Address string `json:"address,omitempty"` 63 CName string `json:"cname,omitempty"` 64 PTRDName string `json:"ptrdname,omitempty"` 65} 66 67// BatchRecordChange represents a batch record change API response. 68type BatchRecordChange struct { 69 ID string `json:"id,omitempty"` 70 UserName string `json:"userName,omitempty"` 71 UserID string `json:"userId,omitempty"` 72 Status string `json:"status,omitempty"` 73 Comments string `json:"comments,omitempty"` 74 CreatedTimestamp string `json:"createdTimestamp,omitempty"` 75 OwnerGroupID string `json:"ownerGroupId,omitempty"` 76 Changes []RecordChange `json:"changes,omitempty"` 77 ApprovalStatus string `json:"approvalStatus,omitempty"` 78 ReviewerID string `json:"reviewerId,omitempty"` 79 ReviewerUserName string `json:"reviewerUserName,omitempty"` 80 ReviewComment string `json:"reviewComment,omitempty"` 81 ReviewTimestamp string `json:"reviewTimestamp,omitempty"` 82 ScheduledTime string `json:"scheduledTime,omitempty"` 83 CancelledTimestamp string `json:"cancelledTimestamp,omitempty"` 84} 85