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
4 changes: 4 additions & 0 deletions sdk/batch/azure-resourcemanager-batch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 1.0.0-beta.1 (2021-07-29)

- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.2 (2021-07-29)

- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
Expand Down
3 changes: 1 addition & 2 deletions sdk/batch/azure-resourcemanager-batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Batch client library for Java.

This package contains Microsoft Azure SDK for Batch Management SDK. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on

## Examples

[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/SAMPLE.md)


## Troubleshooting
Expand Down
2 changes: 1 addition & 1 deletion sdk/batch/azure-resourcemanager-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Batch Management</name>
<description>This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-06.</description>
<description>This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2021-06.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.batch.fluent.BatchManagement;
import com.azure.resourcemanager.batch.fluent.BatchManagementClient;
import com.azure.resourcemanager.batch.implementation.ApplicationPackagesImpl;
import com.azure.resourcemanager.batch.implementation.ApplicationsImpl;
import com.azure.resourcemanager.batch.implementation.BatchAccountsImpl;
import com.azure.resourcemanager.batch.implementation.BatchManagementBuilder;
import com.azure.resourcemanager.batch.implementation.BatchManagementClientBuilder;
import com.azure.resourcemanager.batch.implementation.CertificatesImpl;
import com.azure.resourcemanager.batch.implementation.LocationsImpl;
import com.azure.resourcemanager.batch.implementation.OperationsImpl;
Expand All @@ -46,7 +46,7 @@
import java.util.List;
import java.util.Objects;

/** Entry point to BatchManager. */
/** Entry point to BatchManager. Batch Client. */
public final class BatchManager {
private BatchAccounts batchAccounts;

Expand All @@ -66,13 +66,13 @@ public final class BatchManager {

private Pools pools;

private final BatchManagement clientObject;
private final BatchManagementClient clientObject;

private BatchManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject =
new BatchManagementBuilder()
new BatchManagementClientBuilder()
.pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
Expand Down Expand Up @@ -202,7 +202,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
.append("-")
.append("com.azure.resourcemanager.batch")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -315,10 +315,10 @@ public Pools pools() {
}

/**
* @return Wrapped service client BatchManagement providing direct access to the underlying auto-generated API
* @return Wrapped service client BatchManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*/
public BatchManagement serviceClient() {
public BatchManagementClient serviceClient() {
return this.clientObject;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;

/** The interface for BatchManagement class. */
public interface BatchManagement {
/** The interface for BatchManagementClient class. */
public interface BatchManagementClient {
/**
* Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,52 @@
package com.azure.resourcemanager.batch.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Contains information about an application in a Batch account. */
@JsonFlatten
@Fluent
public final class ApplicationInner extends ProxyResource {
public class ApplicationInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInner.class);

/*
* The properties associated with the Application.
* The display name for the application.
*/
@JsonProperty(value = "properties")
private ApplicationProperties innerProperties;
@JsonProperty(value = "properties.displayName")
private String displayName;

/*
* The ETag of the resource, used for concurrency statements.
* A value indicating whether packages within the application may be
* overwritten using the same version string.
*/
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
@JsonProperty(value = "properties.allowUpdates")
private Boolean allowUpdates;

/**
* Get the innerProperties property: The properties associated with the Application.
*
* @return the innerProperties value.
/*
* The package to use if a client requests the application but does not
* specify a version. This property can only be set to the name of an
* existing package.
*/
private ApplicationProperties innerProperties() {
return this.innerProperties;
}
@JsonProperty(value = "properties.defaultVersion")
private String defaultVersion;

/**
* Get the etag property: The ETag of the resource, used for concurrency statements.
*
* @return the etag value.
/*
* The ETag of the resource, used for concurrency statements.
*/
public String etag() {
return this.etag;
}
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;

/**
* Get the displayName property: The display name for the application.
*
* @return the displayName value.
*/
public String displayName() {
return this.innerProperties() == null ? null : this.innerProperties().displayName();
return this.displayName;
}

/**
Expand All @@ -61,10 +60,7 @@ public String displayName() {
* @return the ApplicationInner object itself.
*/
public ApplicationInner withDisplayName(String displayName) {
if (this.innerProperties() == null) {
this.innerProperties = new ApplicationProperties();
}
this.innerProperties().withDisplayName(displayName);
this.displayName = displayName;
return this;
}

Expand All @@ -75,7 +71,7 @@ public ApplicationInner withDisplayName(String displayName) {
* @return the allowUpdates value.
*/
public Boolean allowUpdates() {
return this.innerProperties() == null ? null : this.innerProperties().allowUpdates();
return this.allowUpdates;
}

/**
Expand All @@ -86,10 +82,7 @@ public Boolean allowUpdates() {
* @return the ApplicationInner object itself.
*/
public ApplicationInner withAllowUpdates(Boolean allowUpdates) {
if (this.innerProperties() == null) {
this.innerProperties = new ApplicationProperties();
}
this.innerProperties().withAllowUpdates(allowUpdates);
this.allowUpdates = allowUpdates;
return this;
}

Expand All @@ -100,7 +93,7 @@ public ApplicationInner withAllowUpdates(Boolean allowUpdates) {
* @return the defaultVersion value.
*/
public String defaultVersion() {
return this.innerProperties() == null ? null : this.innerProperties().defaultVersion();
return this.defaultVersion;
}

/**
Expand All @@ -111,21 +104,24 @@ public String defaultVersion() {
* @return the ApplicationInner object itself.
*/
public ApplicationInner withDefaultVersion(String defaultVersion) {
if (this.innerProperties() == null) {
this.innerProperties = new ApplicationProperties();
}
this.innerProperties().withDefaultVersion(defaultVersion);
this.defaultVersion = defaultVersion;
return this;
}

/**
* Get the etag property: The ETag of the resource, used for concurrency statements.
*
* @return the etag value.
*/
public String etag() {
return this.etag;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

package com.azure.resourcemanager.batch.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.Immutable;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.batch.models.PackageState;
Expand All @@ -13,47 +14,55 @@
import java.time.OffsetDateTime;

/** An application package which represents a particular version of an application. */
@Fluent
public final class ApplicationPackageInner extends ProxyResource {
@JsonFlatten
@Immutable
public class ApplicationPackageInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationPackageInner.class);

/*
* The properties associated with the Application Package.
* The current state of the application package.
*/
@JsonProperty(value = "properties")
private ApplicationPackageProperties innerProperties;
@JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
private PackageState state;

/*
* The ETag of the resource, used for concurrency statements.
* The format of the application package, if the package is active.
*/
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
@JsonProperty(value = "properties.format", access = JsonProperty.Access.WRITE_ONLY)
private String format;

/**
* Get the innerProperties property: The properties associated with the Application Package.
*
* @return the innerProperties value.
/*
* The URL for the application package in Azure Storage.
*/
private ApplicationPackageProperties innerProperties() {
return this.innerProperties;
}
@JsonProperty(value = "properties.storageUrl", access = JsonProperty.Access.WRITE_ONLY)
private String storageUrl;

/**
* Get the etag property: The ETag of the resource, used for concurrency statements.
*
* @return the etag value.
/*
* The UTC time at which the Azure Storage URL will expire.
*/
public String etag() {
return this.etag;
}
@JsonProperty(value = "properties.storageUrlExpiry", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime storageUrlExpiry;

/*
* The time at which the package was last activated, if the package is
* active.
*/
@JsonProperty(value = "properties.lastActivationTime", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime lastActivationTime;

/*
* The ETag of the resource, used for concurrency statements.
*/
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;

/**
* Get the state property: The current state of the application package.
*
* @return the state value.
*/
public PackageState state() {
return this.innerProperties() == null ? null : this.innerProperties().state();
return this.state;
}

/**
Expand All @@ -62,7 +71,7 @@ public PackageState state() {
* @return the format value.
*/
public String format() {
return this.innerProperties() == null ? null : this.innerProperties().format();
return this.format;
}

/**
Expand All @@ -71,7 +80,7 @@ public String format() {
* @return the storageUrl value.
*/
public String storageUrl() {
return this.innerProperties() == null ? null : this.innerProperties().storageUrl();
return this.storageUrl;
}

/**
Expand All @@ -80,7 +89,7 @@ public String storageUrl() {
* @return the storageUrlExpiry value.
*/
public OffsetDateTime storageUrlExpiry() {
return this.innerProperties() == null ? null : this.innerProperties().storageUrlExpiry();
return this.storageUrlExpiry;
}

/**
Expand All @@ -89,7 +98,16 @@ public OffsetDateTime storageUrlExpiry() {
* @return the lastActivationTime value.
*/
public OffsetDateTime lastActivationTime() {
return this.innerProperties() == null ? null : this.innerProperties().lastActivationTime();
return this.lastActivationTime;
}

/**
* Get the etag property: The ETag of the resource, used for concurrency statements.
*
* @return the etag value.
*/
public String etag() {
return this.etag;
}

/**
Expand All @@ -98,8 +116,5 @@ public OffsetDateTime lastActivationTime() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
}
}
Loading