Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.microsoft.azure.management.cosmosdb.v2015_04_08.DatabaseAccountUsage;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.DatabaseAccountMetricDefinition;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.SqlContainer;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.SqlStoredProcedure;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.MongoDBCollection;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.GremlinGraph;

Expand All @@ -44,6 +45,13 @@ public interface DatabaseAccounts extends SupportsCreating<DatabaseAccount.Defin
*/
SqlContainer.DefinitionStages.Blank defineContainer(String name);

/**
* Begins definition for a new StoredProcedure resource.
* @param name resource name.
* @return the first stage of the new StoredProcedure definition.
*/
SqlStoredProcedure.DefinitionStages.Blank defineStoredProcedure(String name);

/**
* Begins definition for a new Collection resource.
* @param name resource name.
Expand Down Expand Up @@ -566,6 +574,44 @@ public interface DatabaseAccounts extends SupportsCreating<DatabaseAccount.Defin
*/
Completable deleteSqlContainerAsync(String resourceGroupName, String accountName, String databaseName, String containerName);

/**
* Gets the SQL StoredProcedure under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param databaseName Cosmos DB database name.
* @param containerName Cosmos DB container name.
* @param storedProcedureName Cosmos DB SQL StoredProcedure name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<SqlStoredProcedure> getSqlStoredProcedureAsync(String resourceGroupName, String accountName, String databaseName, String containerName, String storedProcedureName);

/**
* Lists the SQL stored procedures under an existing Azure Cosmos DB database account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param databaseName Cosmos DB database name.
* @param containerName Cosmos DB container name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<SqlStoredProcedure> listSqlStoredProceduresAsync(String resourceGroupName, String accountName, String databaseName, String containerName);

/**
* Deletes an existing Azure Cosmos DB SQL StoredProcedure.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param databaseName Cosmos DB database name.
* @param containerName Cosmos DB container name.
* @param storedProcedureName Cosmos DB SQL StoredProcedure name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Completable deleteSqlStoredProcedureAsync(String resourceGroupName, String accountName, String databaseName, String containerName, String storedProcedureName);

/**
* Gets the MongoDB collection under an existing Azure Cosmos DB database account.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
/**
* 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.
*/

package com.microsoft.azure.management.cosmosdb.v2015_04_08;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.implementation.SqlStoredProcedureInner;
import com.microsoft.azure.arm.model.Indexable;
import com.microsoft.azure.arm.model.Refreshable;
import com.microsoft.azure.arm.model.Updatable;
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.implementation.CosmosDBManager;
import java.util.Map;

/**
* Type representing SqlStoredProcedure.
*/
public interface SqlStoredProcedure extends HasInner<SqlStoredProcedureInner>, Indexable, Refreshable<SqlStoredProcedure>, Updatable<SqlStoredProcedure.Update>, HasManager<CosmosDBManager> {
/**
* @return the _etag value.
*/
String _etag();

/**
* @return the _rid value.
*/
String _rid();

/**
* @return the _ts value.
*/
Object _ts();

/**
* @return the body value.
*/
String body();

/**
* @return the id value.
*/
String id();

/**
* @return the location value.
*/
String location();

/**
* @return the name value.
*/
String name();

/**
* @return the sqlStoredProcedureId value.
*/
String sqlStoredProcedureId();

/**
* @return the tags value.
*/
Map<String, String> tags();

/**
* @return the type value.
*/
String type();

/**
* The entirety of the SqlStoredProcedure definition.
*/
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithContainer, DefinitionStages.WithOptions, DefinitionStages.WithResource, DefinitionStages.WithCreate {
}

/**
* Grouping of SqlStoredProcedure definition stages.
*/
interface DefinitionStages {
/**
* The first stage of a SqlStoredProcedure definition.
*/
interface Blank extends WithContainer {
}

/**
* The stage of the sqlstoredprocedure definition allowing to specify Container.
*/
interface WithContainer {
/**
* Specifies resourceGroupName, accountName, databaseName, containerName.
* @param resourceGroupName Name of an Azure resource group
* @param accountName Cosmos DB database account name
* @param databaseName Cosmos DB database name
* @param containerName Cosmos DB container name
* @return the next definition stage
*/
WithOptions withExistingContainer(String resourceGroupName, String accountName, String databaseName, String containerName);
}

/**
* The stage of the sqlstoredprocedure definition allowing to specify Options.
*/
interface WithOptions {
/**
* Specifies options.
* @param options A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request
* @return the next definition stage
*/
WithResource withOptions(Map<String, String> options);
}

/**
* The stage of the sqlstoredprocedure definition allowing to specify Resource.
*/
interface WithResource {
/**
* Specifies resource.
* @param resource The standard JSON format of a stored procedure
* @return the next definition stage
*/
WithCreate withResource(SqlStoredProcedureResource resource);
}

/**
* The stage of the definition which contains all the minimum required inputs for
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<SqlStoredProcedure> {
}
}
/**
* The template for a SqlStoredProcedure update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<SqlStoredProcedure> {
}

/**
* Grouping of SqlStoredProcedure update stages.
*/
interface UpdateStages {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/**
* 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.
*/

package com.microsoft.azure.management.cosmosdb.v2015_04_08;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* Parameters to create and update Cosmos DB stored procedure.
*/
@JsonFlatten
public class SqlStoredProcedureCreateUpdateParameters {
/**
* The standard JSON format of a stored procedure.
*/
@JsonProperty(value = "properties.resource", required = true)
private SqlStoredProcedureResource resource;

/**
* A key-value pair of options to be applied for the request. This
* corresponds to the headers sent with the request.
*/
@JsonProperty(value = "properties.options", required = true)
private Map<String, String> options;

/**
* Get the standard JSON format of a stored procedure.
*
* @return the resource value
*/
public SqlStoredProcedureResource resource() {
return this.resource;
}

/**
* Set the standard JSON format of a stored procedure.
*
* @param resource the resource value to set
* @return the SqlStoredProcedureCreateUpdateParameters object itself.
*/
public SqlStoredProcedureCreateUpdateParameters withResource(SqlStoredProcedureResource resource) {
this.resource = resource;
return this;
}

/**
* Get a key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
*
* @return the options value
*/
public Map<String, String> options() {
return this.options;
}

/**
* Set a key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
*
* @param options the options value to set
* @return the SqlStoredProcedureCreateUpdateParameters object itself.
*/
public SqlStoredProcedureCreateUpdateParameters withOptions(Map<String, String> options) {
this.options = options;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* 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.
*/

package com.microsoft.azure.management.cosmosdb.v2015_04_08;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Cosmos DB Gremlin graph resource object.
*/
public class SqlStoredProcedureResource {
/**
* Name of the Sql Stored Procedure.
*/
@JsonProperty(value = "id")
private String id;

/**
* Body of the Stored Procedure.
*/
@JsonProperty(value = "body")
private String body;

/**
* Get name of the Sql Stored Procedure.
*
* @return the id value
*/
public String id() {
return this.id;
}

/**
* Set name of the Sql Stored Procedure.
*
* @param id the id value to set
* @return the SqlStoredProcedureResource object itself.
*/
public SqlStoredProcedureResource withId(String id) {
this.id = id;
return this;
}

/**
* Get body of the Stored Procedure.
*
* @return the body value
*/
public String body() {
return this.body;
}

/**
* Set body of the Stored Procedure.
*
* @param body the body value to set
* @return the SqlStoredProcedureResource object itself.
*/
public SqlStoredProcedureResource withBody(String body) {
this.body = body;
return this;
}

}
Loading