Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-mysql] Remove duplication of TrackedResource in mariaDB and mySQL #1738

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions sdk/mysql/arm-mysql/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,43 +77,6 @@ export interface ServerPrivateEndpointConnection {
readonly properties?: ServerPrivateEndpointConnectionProperties;
}

/**
* An interface representing Resource.
*/
export interface Resource extends BaseResource {
/**
* Fully qualified resource Id for the resource. Ex -
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly id?: string;
/**
* The name of the resource
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly name?: string;
/**
* The type of the resource. Ex- Microsoft.Compute/virtualMachines or
* Microsoft.Storage/storageAccounts.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
}

/**
* The resource model definition for a ARM tracked top level resource
*/
export interface TrackedResource extends Resource {
/**
* Resource tags.
*/
tags?: { [propertyName: string]: string };
/**
* The geo-location where the resource lives
*/
location: string;
}

/**
* Storage Profile properties of a server
*/
Expand Down Expand Up @@ -405,6 +368,43 @@ export interface ResourceIdentity {
readonly tenantId?: string;
}

/**
* An interface representing Resource.
*/
export interface Resource extends BaseResource {
/**
* Fully qualified resource Id for the resource. Ex -
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly id?: string;
/**
* The name of the resource
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly name?: string;
/**
* The type of the resource. Ex- Microsoft.Compute/virtualMachines or
* Microsoft.Storage/storageAccounts.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
}

/**
* The resource model definition for a ARM tracked top level resource
*/
export interface TrackedResource extends Resource {
/**
* Resource tags.
*/
tags?: { [propertyName: string]: string };
/**
* The geo-location where the resource lives
*/
location: string;
}

/**
* Represents a server.
*/
Expand Down
120 changes: 60 additions & 60 deletions sdk/mysql/arm-mysql/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,66 +115,6 @@ export const ServerPrivateEndpointConnection: msRest.CompositeMapper = {
}
};

export const Resource: msRest.CompositeMapper = {
serializedName: "Resource",
type: {
name: "Composite",
className: "Resource",
modelProperties: {
id: {
readOnly: true,
serializedName: "id",
type: {
name: "String"
}
},
name: {
readOnly: true,
serializedName: "name",
type: {
name: "String"
}
},
type: {
readOnly: true,
serializedName: "type",
type: {
name: "String"
}
}
}
}
};

export const TrackedResource: msRest.CompositeMapper = {
serializedName: "TrackedResource",
type: {
name: "Composite",
className: "TrackedResource",
modelProperties: {
...Resource.type.modelProperties,
tags: {
serializedName: "tags",
type: {
name: "Dictionary",
value: {
type: {
name: "String"
}
}
}
},
location: {
required: true,
serializedName: "location",
type: {
name: "String"
}
}
}
}
};

export const StorageProfile: msRest.CompositeMapper = {
serializedName: "StorageProfile",
type: {
Expand Down Expand Up @@ -439,6 +379,66 @@ export const ResourceIdentity: msRest.CompositeMapper = {
}
};

export const Resource: msRest.CompositeMapper = {
serializedName: "Resource",
type: {
name: "Composite",
className: "Resource",
modelProperties: {
id: {
readOnly: true,
serializedName: "id",
type: {
name: "String"
}
},
name: {
readOnly: true,
serializedName: "name",
type: {
name: "String"
}
},
type: {
readOnly: true,
serializedName: "type",
type: {
name: "String"
}
}
}
}
};

export const TrackedResource: msRest.CompositeMapper = {
serializedName: "TrackedResource",
type: {
name: "Composite",
className: "TrackedResource",
modelProperties: {
...Resource.type.modelProperties,
tags: {
serializedName: "tags",
type: {
name: "Dictionary",
value: {
type: {
name: "String"
}
}
}
},
location: {
required: true,
serializedName: "location",
type: {
name: "String"
}
}
}
}
};

export const Server: msRest.CompositeMapper = {
serializedName: "Server",
type: {
Expand Down