forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
189 lines (168 loc) · 8.04 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
package storagetables
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/storage/tables/2019-02-02-preview/storagetables"
// AccessPolicy an Access policy.
type AccessPolicy struct {
// Start - The start datetime from which the policy is active.
Start *date.Time `json:"Start,omitempty"`
// Expiry - The datetime that the policy expires.
Expiry *date.Time `json:"Expiry,omitempty"`
// Permission - The permissions for the acl policy.
Permission *string `json:"Permission,omitempty"`
}
// CorsRule CORS is an HTTP feature that enables a web application running under one domain to access
// resources in another domain. Web browsers implement a security restriction known as same-origin policy
// that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow
// one domain (the origin domain) to call APIs in another domain.
type CorsRule struct {
// AllowedOrigins - The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS.
AllowedOrigins *string `json:"AllowedOrigins,omitempty"`
// AllowedMethods - The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)
AllowedMethods *string `json:"AllowedMethods,omitempty"`
// AllowedHeaders - The request headers that the origin domain may specify on the CORS request.
AllowedHeaders *string `json:"AllowedHeaders,omitempty"`
// ExposedHeaders - The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
ExposedHeaders *string `json:"ExposedHeaders,omitempty"`
// MaxAgeInSeconds - The maximum amount time that a browser should cache the preflight OPTIONS request.
MaxAgeInSeconds *int32 `json:"MaxAgeInSeconds,omitempty"`
}
// GeoReplication ...
type GeoReplication struct {
// Status - The status of the secondary location. Possible values include: 'Live', 'Bootstrap', 'Unavailable'
Status GeoReplicationStatusType `json:"Status,omitempty"`
// LastSyncTime - A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads.
LastSyncTime *date.TimeRFC1123 `json:"LastSyncTime,omitempty"`
}
// ListSignedIdentifier ...
type ListSignedIdentifier struct {
autorest.Response `json:"-"`
Value *[]SignedIdentifier `json:"value,omitempty"`
}
// Logging azure Analytics Logging settings.
type Logging struct {
// Version - The version of Analytics to configure.
Version *string `json:"Version,omitempty"`
// Delete - Indicates whether all delete requests should be logged.
Delete *bool `json:"Delete,omitempty"`
// Read - Indicates whether all read requests should be logged.
Read *bool `json:"Read,omitempty"`
// Write - Indicates whether all write requests should be logged.
Write *bool `json:"Write,omitempty"`
RetentionPolicy *RetentionPolicy `json:"RetentionPolicy,omitempty"`
}
// Metrics ...
type Metrics struct {
// Version - The version of Analytics to configure.
Version *string `json:"Version,omitempty"`
// Enabled - Indicates whether metrics are enabled for the Table service.
Enabled *bool `json:"Enabled,omitempty"`
// IncludeAPIs - Indicates whether metrics should generate summary statistics for called API operations.
IncludeAPIs *bool `json:"IncludeAPIs,omitempty"`
RetentionPolicy *RetentionPolicy `json:"RetentionPolicy,omitempty"`
}
// RetentionPolicy the retention policy.
type RetentionPolicy struct {
// Enabled - Indicates whether a retention policy is enabled for the service.
Enabled *bool `json:"Enabled,omitempty"`
// Days - Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted.
Days *int32 `json:"Days,omitempty"`
}
// SetSetObject ...
type SetSetObject struct {
autorest.Response `json:"-"`
Value map[string]interface{} `json:"value"`
}
// MarshalJSON is the custom marshaler for SetSetObject.
func (sso SetSetObject) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if sso.Value != nil {
objectMap["value"] = sso.Value
}
return json.Marshal(objectMap)
}
// SignedIdentifier a signed identifier.
type SignedIdentifier struct {
// ID - A unique id.
ID *string `json:"Id,omitempty"`
// AccessPolicy - The access policy.
AccessPolicy *AccessPolicy `json:"AccessPolicy,omitempty"`
}
// TableEntityQueryResponse the properties for the table entity query response.
type TableEntityQueryResponse struct {
autorest.Response `json:"-"`
// OdataMetadata - The metadata response of the table.
OdataMetadata *string `json:"odata.metadata,omitempty"`
// Value - List of table entities.
Value *[]map[string]interface{} `json:"value,omitempty"`
}
// TableProperties the properties for creating a table.
type TableProperties struct {
// TableName - The name of the table to create.
TableName *string `json:"TableName,omitempty"`
}
// TableQueryResponse the properties for the table query response.
type TableQueryResponse struct {
autorest.Response `json:"-"`
// OdataMetadata - The metadata response of the table.
OdataMetadata *string `json:"odata.metadata,omitempty"`
// Value - List of tables.
Value *[]TableResponseProperties `json:"value,omitempty"`
}
// TableResponse the response for a single table.
type TableResponse struct {
autorest.Response `json:"-"`
// OdataMetadata - The metadata response of the table.
OdataMetadata *string `json:"odata.metadata,omitempty"`
// TableName - The name of the table.
TableName *string `json:"TableName,omitempty"`
// OdataType - The odata type of the table.
OdataType *string `json:"odata.type,omitempty"`
// OdataID - The id of the table.
OdataID *string `json:"odata.id,omitempty"`
// OdataEditLink - The edit link of the table.
OdataEditLink *string `json:"odata.editLink,omitempty"`
}
// TableResponseProperties the properties for the table response.
type TableResponseProperties struct {
// TableName - The name of the table.
TableName *string `json:"TableName,omitempty"`
// OdataType - The odata type of the table.
OdataType *string `json:"odata.type,omitempty"`
// OdataID - The id of the table.
OdataID *string `json:"odata.id,omitempty"`
// OdataEditLink - The edit link of the table.
OdataEditLink *string `json:"odata.editLink,omitempty"`
}
// TableServiceError table Service error.
type TableServiceError struct {
// Message - The error message.
Message *string `json:"Message,omitempty"`
}
// TableServiceProperties table Service Properties.
type TableServiceProperties struct {
autorest.Response `json:"-"`
// Logging - Azure Analytics Logging settings.
Logging *Logging `json:"Logging,omitempty"`
// HourMetrics - A summary of request statistics grouped by API in hourly aggregates for tables.
HourMetrics *Metrics `json:"HourMetrics,omitempty"`
// MinuteMetrics - A summary of request statistics grouped by API in minute aggregates for tables.
MinuteMetrics *Metrics `json:"MinuteMetrics,omitempty"`
// Cors - The set of CORS rules.
Cors *[]CorsRule `json:"Cors,omitempty"`
}
// TableServiceStats stats for the service.
type TableServiceStats struct {
autorest.Response `json:"-"`
// GeoReplication - Geo-Replication information for the Secondary Storage Service.
GeoReplication *GeoReplication `json:"GeoReplication,omitempty"`
}