...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/storage/tables/2019-02-02-preview/storagetables/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/storage/tables/2019-02-02-preview/storagetables

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

View as plain text