-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mgmt Appplatform: custom domain, certificate and samples (#13127)
* add interface for left api * add impl * add test for custom domain * update specs * regen * fix compile error * add app platform sample * add samples.json remaining wrong filepath * fix checkstyle * fix checkstyle * disconnect in finally
- Loading branch information
Showing
35 changed files
with
1,705 additions
and
83 deletions.
There are no files selected for viewing
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
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
64 changes: 64 additions & 0 deletions
64
...c/main/java/com/azure/resourcemanager/appplatform/implementation/SpringAppDomainImpl.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,64 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.resourcemanager.appplatform.implementation; | ||
|
||
import com.azure.resourcemanager.appplatform.AppPlatformManager; | ||
import com.azure.resourcemanager.appplatform.fluent.inner.CustomDomainResourceInner; | ||
import com.azure.resourcemanager.appplatform.models.CustomDomainProperties; | ||
import com.azure.resourcemanager.appplatform.models.SpringApp; | ||
import com.azure.resourcemanager.appplatform.models.SpringAppDomain; | ||
import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; | ||
import reactor.core.publisher.Mono; | ||
|
||
public class SpringAppDomainImpl | ||
extends ExternalChildResourceImpl<SpringAppDomain, CustomDomainResourceInner, SpringAppImpl, SpringApp> | ||
implements SpringAppDomain { | ||
SpringAppDomainImpl(String name, SpringAppImpl parent, CustomDomainResourceInner innerObject) { | ||
super(name, parent, innerObject); | ||
} | ||
|
||
@Override | ||
public Mono<SpringAppDomain> createResourceAsync() { | ||
return manager().inner().getCustomDomains().createOrUpdateAsync( | ||
parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name(), properties() | ||
) | ||
.map(inner -> { | ||
setInner(inner); | ||
return this; | ||
}); | ||
} | ||
|
||
@Override | ||
public Mono<SpringAppDomain> updateResourceAsync() { | ||
return createResourceAsync(); | ||
} | ||
|
||
@Override | ||
public Mono<Void> deleteResourceAsync() { | ||
return manager().inner().getBindings().deleteAsync( | ||
parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() | ||
); | ||
} | ||
|
||
@Override | ||
protected Mono<CustomDomainResourceInner> getInnerAsync() { | ||
return manager().inner().getCustomDomains().getAsync( | ||
parent().parent().resourceGroupName(), parent().parent().name(), parent().name(), name() | ||
); | ||
} | ||
|
||
@Override | ||
public String id() { | ||
return inner().id(); | ||
} | ||
|
||
@Override | ||
public CustomDomainProperties properties() { | ||
return inner().properties(); | ||
} | ||
|
||
private AppPlatformManager manager() { | ||
return parent().manager(); | ||
} | ||
} |
Oops, something went wrong.