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

[ReleasePR sdk/cosmos/mgmt-v2020_03_01] Add properties to CosmosDb PrivateEndpointConnection and PrivateLinkResource #10294

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
2 changes: 1 addition & 1 deletion sdk/cosmos/mgmt-v2020_03_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.3.0</version>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-cosmosdb</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
* Type representing PrivateEndpointConnection.
*/
public interface PrivateEndpointConnection extends HasInner<PrivateEndpointConnectionInner>, Indexable, Refreshable<PrivateEndpointConnection>, Updatable<PrivateEndpointConnection.Update>, HasManager<CosmosDBManager> {
/**
* @return the groupId value.
*/
String groupId();

/**
* @return the id value.
*/
Expand All @@ -42,6 +47,11 @@ public interface PrivateEndpointConnection extends HasInner<PrivateEndpointConne
*/
PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState();

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

/**
* @return the type value.
*/
Expand Down Expand Up @@ -76,6 +86,18 @@ interface WithDatabaseAccount {
WithCreate withExistingDatabaseAccount(String resourceGroupName, String accountName);
}

/**
* The stage of the privateendpointconnection definition allowing to specify GroupId.
*/
interface WithGroupId {
/**
* Specifies groupId.
* @param groupId Group id of the private endpoint
* @return the next definition stage
*/
WithCreate withGroupId(String groupId);
}

/**
* The stage of the privateendpointconnection definition allowing to specify PrivateEndpoint.
*/
Expand All @@ -100,24 +122,48 @@ interface WithPrivateLinkServiceConnectionState {
WithCreate withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState);
}

/**
* The stage of the privateendpointconnection definition allowing to specify ProvisioningState.
*/
interface WithProvisioningState {
/**
* Specifies provisioningState.
* @param provisioningState Provisioning state of the private endpoint
* @return the next definition stage
*/
WithCreate withProvisioningState(String provisioningState);
}

/**
* 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<PrivateEndpointConnection>, DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState {
interface WithCreate extends Creatable<PrivateEndpointConnection>, DefinitionStages.WithGroupId, DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState, DefinitionStages.WithProvisioningState {
}
}
/**
* The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<PrivateEndpointConnection>, UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState {
interface Update extends Appliable<PrivateEndpointConnection>, UpdateStages.WithGroupId, UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState, UpdateStages.WithProvisioningState {
}

/**
* Grouping of PrivateEndpointConnection update stages.
*/
interface UpdateStages {
/**
* The stage of the privateendpointconnection update allowing to specify GroupId.
*/
interface WithGroupId {
/**
* Specifies groupId.
* @param groupId Group id of the private endpoint
* @return the next update stage
*/
Update withGroupId(String groupId);
}

/**
* The stage of the privateendpointconnection update allowing to specify PrivateEndpoint.
*/
Expand All @@ -142,5 +188,17 @@ interface WithPrivateLinkServiceConnectionState {
Update withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState);
}

/**
* The stage of the privateendpointconnection update allowing to specify ProvisioningState.
*/
interface WithProvisioningState {
/**
* Specifies provisioningState.
* @param provisioningState Provisioning state of the private endpoint
* @return the next update stage
*/
Update withProvisioningState(String provisioningState);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public interface PrivateLinkResource extends HasInner<PrivateLinkResourceInner>,
*/
List<String> requiredMembers();

/**
* @return the requiredZoneNames value.
*/
List<String> requiredZoneNames();

/**
* @return the type value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import com.microsoft.azure.management.cosmosdb.v2020_03_01.NotebookWorkspace;
import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
import com.microsoft.azure.management.cosmosdb.v2020_03_01.NotebookWorkspaceCreateUpdateParameters;
import rx.Observable;

class NotebookWorkspaceImpl extends CreatableUpdatableImpl<NotebookWorkspace, NotebookWorkspaceInner, NotebookWorkspaceImpl> implements NotebookWorkspace, NotebookWorkspace.Definition, NotebookWorkspace.Update {
Expand Down Expand Up @@ -45,14 +44,14 @@ public CosmosDBManager manager() {
@Override
public Observable<NotebookWorkspace> createResourceAsync() {
NotebookWorkspacesInner client = this.manager().inner().notebookWorkspaces();
return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, new NotebookWorkspaceCreateUpdateParameters())
return client.createOrUpdateAsync(this.resourceGroupName, this.accountName)
.map(innerToFluentMap(this));
}

@Override
public Observable<NotebookWorkspace> updateResourceAsync() {
NotebookWorkspacesInner client = this.manager().inner().notebookWorkspaces();
return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, new NotebookWorkspaceCreateUpdateParameters())
return client.createOrUpdateAsync(this.resourceGroupName, this.accountName)
.map(innerToFluentMap(this));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ private ServiceResponse<NotebookWorkspaceInner> getDelegate(Response<ResponseBod
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the NotebookWorkspaceInner object if successful.
*/
public NotebookWorkspaceInner createOrUpdate(String resourceGroupName, String accountName, NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, notebookCreateUpdateParameters).toBlocking().last().body();
public NotebookWorkspaceInner createOrUpdate(String resourceGroupName, String accountName) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body();
}

/**
Expand All @@ -301,8 +301,8 @@ public NotebookWorkspaceInner createOrUpdate(String resourceGroupName, String ac
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<NotebookWorkspaceInner> createOrUpdateAsync(String resourceGroupName, String accountName, NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters, final ServiceCallback<NotebookWorkspaceInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, notebookCreateUpdateParameters), serviceCallback);
public ServiceFuture<NotebookWorkspaceInner> createOrUpdateAsync(String resourceGroupName, String accountName, final ServiceCallback<NotebookWorkspaceInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback);
}

/**
Expand All @@ -313,8 +313,8 @@ public ServiceFuture<NotebookWorkspaceInner> createOrUpdateAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<NotebookWorkspaceInner> createOrUpdateAsync(String resourceGroupName, String accountName, NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, notebookCreateUpdateParameters).map(new Func1<ServiceResponse<NotebookWorkspaceInner>, NotebookWorkspaceInner>() {
public Observable<NotebookWorkspaceInner> createOrUpdateAsync(String resourceGroupName, String accountName) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<NotebookWorkspaceInner>, NotebookWorkspaceInner>() {
@Override
public NotebookWorkspaceInner call(ServiceResponse<NotebookWorkspaceInner> response) {
return response.body();
Expand All @@ -330,7 +330,7 @@ public NotebookWorkspaceInner call(ServiceResponse<NotebookWorkspaceInner> respo
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<NotebookWorkspaceInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters) {
public Observable<ServiceResponse<NotebookWorkspaceInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
Expand All @@ -356,8 +356,8 @@ public Observable<ServiceResponse<NotebookWorkspaceInner>> createOrUpdateWithSer
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the NotebookWorkspaceInner object if successful.
*/
public NotebookWorkspaceInner beginCreateOrUpdate(String resourceGroupName, String accountName, NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, notebookCreateUpdateParameters).toBlocking().single().body();
public NotebookWorkspaceInner beginCreateOrUpdate(String resourceGroupName, String accountName) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body();
}

/**
Expand All @@ -369,8 +369,8 @@ public NotebookWorkspaceInner beginCreateOrUpdate(String resourceGroupName, Stri
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<NotebookWorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String accountName, NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters, final ServiceCallback<NotebookWorkspaceInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, notebookCreateUpdateParameters), serviceCallback);
public ServiceFuture<NotebookWorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String accountName, final ServiceCallback<NotebookWorkspaceInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback);
}

/**
Expand All @@ -381,8 +381,8 @@ public ServiceFuture<NotebookWorkspaceInner> beginCreateOrUpdateAsync(String res
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NotebookWorkspaceInner object
*/
public Observable<NotebookWorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String accountName, NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, notebookCreateUpdateParameters).map(new Func1<ServiceResponse<NotebookWorkspaceInner>, NotebookWorkspaceInner>() {
public Observable<NotebookWorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String accountName) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<NotebookWorkspaceInner>, NotebookWorkspaceInner>() {
@Override
public NotebookWorkspaceInner call(ServiceResponse<NotebookWorkspaceInner> response) {
return response.body();
Expand All @@ -398,7 +398,7 @@ public NotebookWorkspaceInner call(ServiceResponse<NotebookWorkspaceInner> respo
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NotebookWorkspaceInner object
*/
public Observable<ServiceResponse<NotebookWorkspaceInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters) {
public Observable<ServiceResponse<NotebookWorkspaceInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public boolean isInCreateMode() {
}


@Override
public String groupId() {
return this.inner().groupId();
}

@Override
public String id() {
return this.inner().id();
Expand All @@ -91,6 +96,11 @@ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionSta
return this.inner().privateLinkServiceConnectionState();
}

@Override
public String provisioningState() {
return this.inner().provisioningState();
}

@Override
public String type() {
return this.inner().type();
Expand All @@ -103,6 +113,12 @@ public PrivateEndpointConnectionImpl withExistingDatabaseAccount(String resource
return this;
}

@Override
public PrivateEndpointConnectionImpl withGroupId(String groupId) {
this.inner().withGroupId(groupId);
return this;
}

@Override
public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) {
this.inner().withPrivateEndpoint(privateEndpoint);
Expand All @@ -115,4 +131,10 @@ public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(Priva
return this;
}

@Override
public PrivateEndpointConnectionImpl withProvisioningState(String provisioningState) {
this.inner().withProvisioningState(provisioningState);
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ public class PrivateEndpointConnectionInner extends ProxyResource {
@JsonProperty(value = "properties.privateLinkServiceConnectionState")
private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState;

/**
* Group id of the private endpoint.
*/
@JsonProperty(value = "properties.groupId")
private String groupId;

/**
* Provisioning state of the private endpoint.
*/
@JsonProperty(value = "properties.provisioningState")
private String provisioningState;

/**
* Get private endpoint which the connection belongs to.
*
Expand Down Expand Up @@ -71,4 +83,44 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(Priv
return this;
}

/**
* Get group id of the private endpoint.
*
* @return the groupId value
*/
public String groupId() {
return this.groupId;
}

/**
* Set group id of the private endpoint.
*
* @param groupId the groupId value to set
* @return the PrivateEndpointConnectionInner object itself.
*/
public PrivateEndpointConnectionInner withGroupId(String groupId) {
this.groupId = groupId;
return this;
}

/**
* Get provisioning state of the private endpoint.
*
* @return the provisioningState value
*/
public String provisioningState() {
return this.provisioningState;
}

/**
* Set provisioning state of the private endpoint.
*
* @param provisioningState the provisioningState value to set
* @return the PrivateEndpointConnectionInner object itself.
*/
public PrivateEndpointConnectionInner withProvisioningState(String provisioningState) {
this.provisioningState = provisioningState;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public List<String> requiredMembers() {
return this.inner().requiredMembers();
}

@Override
public List<String> requiredZoneNames() {
return this.inner().requiredZoneNames();
}

@Override
public String type() {
return this.inner().type();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public class PrivateLinkResourceInner extends ARMProxyResource {
@JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
private List<String> requiredMembers;

/**
* The private link resource required zone names.
*/
@JsonProperty(value = "properties.requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY)
private List<String> requiredZoneNames;

/**
* Get the private link resource group id.
*
Expand All @@ -48,4 +54,13 @@ public List<String> requiredMembers() {
return this.requiredMembers;
}

/**
* Get the private link resource required zone names.
*
* @return the requiredZoneNames value
*/
public List<String> requiredZoneNames() {
return this.requiredZoneNames;
}

}