diff --git a/sdk/tables/autorest.md b/sdk/tables/autorest.md new file mode 100644 index 000000000000..9b55f2592ae0 --- /dev/null +++ b/sdk/tables/autorest.md @@ -0,0 +1,41 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + + + + +``` yaml +go: true +version: "^3.0.0" +input-file: https://github.com/Azure/azure-rest-api-specs/blob/d744b6bcb95ab4034832ded556dbbe58f4287c5b/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json +license-header: MICROSOFT_MIT_NO_VERSION +clear-output-folder: false +output-folder: aztable +file-prefix: "zz_generated_" +# namespace: aztable +tag: package-2019-02 +credential-scope: none +use: "@autorest/go@4.0.0-preview.23" +openapi-type: data-plane +``` + + + + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2019-02 +``` \ No newline at end of file diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 7907eef6963b..90d560afd3e7 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -28,7 +28,8 @@ func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *T if isCosmosEndpoint(serviceURL) { conOptions.PerCallPolicies = []azcore.Policy{CosmosPatchTransformPolicy{}} } - con := newConnection(serviceURL, cred, conOptions) + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{"none"}}})) + con := newConnection(serviceURL, conOptions) c, _ := cred.(*SharedKeyCredential) return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: *c}, nil } diff --git a/sdk/tables/aztable/zz_generated_connection.go b/sdk/tables/aztable/zz_generated_connection.go index cd1a38ffeee2..6aa8ad00d8b3 100644 --- a/sdk/tables/aztable/zz_generated_connection.go +++ b/sdk/tables/aztable/zz_generated_connection.go @@ -13,9 +13,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -const scope = "none" -const telemetryInfo = "azsdk-go-aztable/" - // connectionOptions contains configuration settings for the connection's pipeline. // All zero-value fields will be initialized with their default values. type connectionOptions struct { @@ -52,7 +49,7 @@ type connection struct { // newConnection creates an instance of the connection type with the specified endpoint. // Pass nil to accept the default options; this is the same as passing a zero-value options. -func newConnection(endpoint string, cred azcore.Credential, options *connectionOptions) *connection { +func newConnection(endpoint string, options *connectionOptions) *connection { if options == nil { options = &connectionOptions{} } @@ -62,7 +59,6 @@ func newConnection(endpoint string, cred azcore.Credential, options *connectionO policies = append(policies, options.PerCallPolicies...) policies = append(policies, azcore.NewRetryPolicy(&options.Retry)) policies = append(policies, options.PerRetryPolicies...) - policies = append(policies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{scope}}})) policies = append(policies, azcore.NewLogPolicy(&options.Logging)) return &connection{u: endpoint, p: azcore.NewPipeline(options.HTTPClient, policies...)} } diff --git a/sdk/tables/aztable/zz_generated_constants.go b/sdk/tables/aztable/zz_generated_constants.go index ea93a2783c11..3e7b261c70c7 100644 --- a/sdk/tables/aztable/zz_generated_constants.go +++ b/sdk/tables/aztable/zz_generated_constants.go @@ -7,6 +7,8 @@ package aztable +const telemetryInfo = "azsdk-go-aztable/" + // GeoReplicationStatusType - The status of the secondary location. type GeoReplicationStatusType string diff --git a/sdk/tables/aztable/zz_generated_models.go b/sdk/tables/aztable/zz_generated_models.go index 308254266891..3daf1c657f99 100644 --- a/sdk/tables/aztable/zz_generated_models.go +++ b/sdk/tables/aztable/zz_generated_models.go @@ -158,19 +158,13 @@ type Metrics struct { // QueryOptions contains a group of parameters for the Table.Query method. type QueryOptions struct { - // An Odata filter expression that limits results to those entities that satisfy the filter expression. - // For example, the following expression would return only entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'" + // OData filter expression. Filter *string - // Specifies the media type for the response. Format *OdataMetadataFormat - - // Select: A comma delimited list of entity property names that selects which set of entity properties to return in the result set. - // For example, the following value would return results containing only the PartitionKey and RowKey properties: "PartitionKey, RowKey" + // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". Select *string - - // Top: The maximum number of entities that will be returned per page of results. - // Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. + // Maximum number of records to return. Top *int32 }