-
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.
Merge pull request #803 from martinsawicki/martin-creatable
Moving create(), update() into base impl classes; other corrections
- Loading branch information
Showing
31 changed files
with
91 additions
and
260 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...tation/KnownLinuxVirtualMachineImage.java → ...ompute/KnownLinuxVirtualMachineImage.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
2 changes: 1 addition & 1 deletion
2
...tion/KnownWindowsVirtualMachineImage.java → ...pute/KnownWindowsVirtualMachineImage.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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,4 @@ public enum ResourceGroupExportTemplateOptions { | |
public String toString() { | ||
return this.value; | ||
} | ||
} | ||
} |
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
38 changes: 38 additions & 0 deletions
38
...ft/azure/management/resources/fluentcore/model/implementation/CreatableUpdatableImpl.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,38 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
*/ | ||
|
||
package com.microsoft.azure.management.resources.fluentcore.model.implementation; | ||
|
||
import com.microsoft.azure.management.resources.fluentcore.model.Appliable; | ||
|
||
/** | ||
* The base class for all updatable resource. | ||
* | ||
* @param <FluentModelT> the fluent model type representing the resource | ||
* @param <InnerModelT> the model inner type that the fluent model type wraps | ||
* @param <FluentModelImplT> the implementation type of the fluent model | ||
*/ | ||
public abstract class CreatableUpdatableImpl<FluentModelT, InnerModelT, FluentModelImplT> | ||
extends CreatableImpl<FluentModelT, InnerModelT, FluentModelImplT> { | ||
|
||
protected CreatableUpdatableImpl(String name, InnerModelT innerObject) { | ||
super(name, innerObject); | ||
} | ||
|
||
/** | ||
* Begins an update for a new resource. | ||
* <p> | ||
* This is the beginning of the builder pattern used to update top level resources | ||
* in Azure. The final method completing the definition and starting the actual resource creation | ||
* process in Azure is {@link Appliable#apply()}. | ||
* | ||
* @return the stage of new resource update | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public FluentModelImplT update() { | ||
return (FluentModelImplT) this; | ||
} | ||
} |
Oops, something went wrong.