forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from jianghaolu/storage-proto
Builders for generated clients
- Loading branch information
Showing
8 changed files
with
260 additions
and
12 deletions.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
...e/client/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
|
||
package com.azure.storage.blob.implementation; | ||
|
||
import com.azure.core.http.HttpPipeline; | ||
import com.azure.core.implementation.RestProxy; | ||
|
||
/** | ||
* A builder for creating a new instance of the AzureBlobStorage type. | ||
*/ | ||
public final class AzureBlobStorageBuilder { | ||
/* | ||
* The URL of the service account, container, or blob that is the targe of the desired operation. | ||
*/ | ||
private String url; | ||
|
||
/** | ||
* Sets The URL of the service account, container, or blob that is the targe of the desired operation. | ||
* | ||
* @param url the url value. | ||
* @return the AzureBlobStorageBuilder. | ||
*/ | ||
public AzureBlobStorageBuilder url(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
|
||
/* | ||
* Specifies the version of the operation to use for this request. | ||
*/ | ||
private String version; | ||
|
||
/** | ||
* Sets Specifies the version of the operation to use for this request. | ||
* | ||
* @param version the version value. | ||
* @return the AzureBlobStorageBuilder. | ||
*/ | ||
public AzureBlobStorageBuilder version(String version) { | ||
this.version = version; | ||
return this; | ||
} | ||
|
||
/* | ||
* The HTTP pipeline to send requests through | ||
*/ | ||
private HttpPipeline pipeline; | ||
|
||
/** | ||
* Sets The HTTP pipeline to send requests through. | ||
* | ||
* @param pipeline the pipeline value. | ||
* @return the AzureBlobStorageBuilder. | ||
*/ | ||
public AzureBlobStorageBuilder pipeline(HttpPipeline pipeline) { | ||
this.pipeline = pipeline; | ||
return this; | ||
} | ||
|
||
/** | ||
* Builds an instance of AzureBlobStorageImpl with the provided parameters. | ||
* | ||
* @return an instance of AzureBlobStorageImpl. | ||
*/ | ||
public AzureBlobStorageImpl build() { | ||
if (version == null) { | ||
this.version = "2018-11-09"; | ||
} | ||
if (pipeline == null) { | ||
this.pipeline = RestProxy.createDefaultPipeline(); | ||
} | ||
AzureBlobStorageImpl client = new AzureBlobStorageImpl(pipeline); | ||
if (this.url != null) { | ||
client.url(this.url); | ||
} | ||
if (this.version != null) { | ||
client.version(this.version); | ||
} | ||
return client; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
...e/client/src/main/java/com/azure/storage/file/implementation/AzureFileStorageBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
|
||
package com.azure.storage.file.implementation; | ||
|
||
import com.azure.core.http.HttpPipeline; | ||
import com.azure.core.implementation.RestProxy; | ||
|
||
/** | ||
* A builder for creating a new instance of the AzureFileStorage type. | ||
*/ | ||
public final class AzureFileStorageBuilder { | ||
/* | ||
* Specifies the version of the operation to use for this request. | ||
*/ | ||
private String version; | ||
|
||
/** | ||
* Sets Specifies the version of the operation to use for this request. | ||
* | ||
* @param version the version value. | ||
* @return the AzureFileStorageBuilder. | ||
*/ | ||
public AzureFileStorageBuilder version(String version) { | ||
this.version = version; | ||
return this; | ||
} | ||
|
||
/* | ||
* The URL of the service account, share, directory or file that is the target of the desired operation. | ||
*/ | ||
private String url; | ||
|
||
/** | ||
* Sets The URL of the service account, share, directory or file that is the target of the desired operation. | ||
* | ||
* @param url the url value. | ||
* @return the AzureFileStorageBuilder. | ||
*/ | ||
public AzureFileStorageBuilder url(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
|
||
/* | ||
* The HTTP pipeline to send requests through | ||
*/ | ||
private HttpPipeline pipeline; | ||
|
||
/** | ||
* Sets The HTTP pipeline to send requests through. | ||
* | ||
* @param pipeline the pipeline value. | ||
* @return the AzureFileStorageBuilder. | ||
*/ | ||
public AzureFileStorageBuilder pipeline(HttpPipeline pipeline) { | ||
this.pipeline = pipeline; | ||
return this; | ||
} | ||
|
||
/** | ||
* Builds an instance of AzureFileStorageImpl with the provided parameters. | ||
* | ||
* @return an instance of AzureFileStorageImpl. | ||
*/ | ||
public AzureFileStorageImpl build() { | ||
if (version == null) { | ||
this.version = "2018-11-09"; | ||
} | ||
if (pipeline == null) { | ||
this.pipeline = RestProxy.createDefaultPipeline(); | ||
} | ||
AzureFileStorageImpl client = new AzureFileStorageImpl(pipeline); | ||
if (this.version != null) { | ||
client.version(this.version); | ||
} | ||
if (this.url != null) { | ||
client.url(this.url); | ||
} | ||
return client; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
...client/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
|
||
package com.azure.storage.queue.implementation; | ||
|
||
import com.azure.core.http.HttpPipeline; | ||
import com.azure.core.implementation.RestProxy; | ||
|
||
/** | ||
* A builder for creating a new instance of the AzureQueueStorage type. | ||
*/ | ||
public final class AzureQueueStorageBuilder { | ||
/* | ||
* The URL of the service account, queue or message that is the targe of the desired operation. | ||
*/ | ||
private String url; | ||
|
||
/** | ||
* Sets The URL of the service account, queue or message that is the targe of the desired operation. | ||
* | ||
* @param url the url value. | ||
* @return the AzureQueueStorageBuilder. | ||
*/ | ||
public AzureQueueStorageBuilder url(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
|
||
/* | ||
* Specifies the version of the operation to use for this request. | ||
*/ | ||
private String version; | ||
|
||
/** | ||
* Sets Specifies the version of the operation to use for this request. | ||
* | ||
* @param version the version value. | ||
* @return the AzureQueueStorageBuilder. | ||
*/ | ||
public AzureQueueStorageBuilder version(String version) { | ||
this.version = version; | ||
return this; | ||
} | ||
|
||
/* | ||
* The HTTP pipeline to send requests through | ||
*/ | ||
private HttpPipeline pipeline; | ||
|
||
/** | ||
* Sets The HTTP pipeline to send requests through. | ||
* | ||
* @param pipeline the pipeline value. | ||
* @return the AzureQueueStorageBuilder. | ||
*/ | ||
public AzureQueueStorageBuilder pipeline(HttpPipeline pipeline) { | ||
this.pipeline = pipeline; | ||
return this; | ||
} | ||
|
||
/** | ||
* Builds an instance of AzureQueueStorageImpl with the provided parameters. | ||
* | ||
* @return an instance of AzureQueueStorageImpl. | ||
*/ | ||
public AzureQueueStorageImpl build() { | ||
if (version == null) { | ||
this.version = "2018-03-28"; | ||
} | ||
if (pipeline == null) { | ||
this.pipeline = RestProxy.createDefaultPipeline(); | ||
} | ||
AzureQueueStorageImpl client = new AzureQueueStorageImpl(pipeline); | ||
if (this.url != null) { | ||
client.url(this.url); | ||
} | ||
if (this.version != null) { | ||
client.version(this.version); | ||
} | ||
return client; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters