Skip to content
Merged
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
10 changes: 5 additions & 5 deletions locks/resource-manager/v2016_09_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.0.0</version>
<version>0.0.3-beta</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-locks</artifactId>
<version>1.0.0-beta-1</version>
<version>1.0.0-beta-2</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for Authorization Management</name>
<description>This package contains Microsoft Authorization Management SDK.</description>
<url>https://github.com/Azure/azure-libraries-for-java</url>
<url>https://github.com/Azure/azure-sdk-for-java</url>
<licenses>
<license>
<name>The MIT License (MIT)</name>
Expand All @@ -28,8 +28,8 @@
</license>
</licenses>
<scm>
<url>scm:git:https://github.com/Azure/azure-libraries-for-java</url>
<connection>scm:git:git@github.com:Azure/azure-libraries-for-java.git</connection>
<url>scm:git:https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</connection>
<tag>HEAD</tag>
</scm>
<properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.locks.v2016_09_01;

import rx.Observable;
import com.microsoft.azure.management.locks.v2016_09_01.implementation.AuthorizationOperationsInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing AuthorizationOperations.
*/
public interface AuthorizationOperations extends HasInner<AuthorizationOperationsInner> {
/**
* Lists all of the available Microsoft.Authorization REST API operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<Operation> listAsync();

}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ interface Blank extends WithResourceGroupName {
interface WithResourceGroupName {
/**
* Specifies resourceGroupName.
* @param resourceGroupName The name of the resource group to lock
* @return the next definition stage
*/
WithLevel withResourceGroupName(String resourceGroupName);
}
Expand All @@ -85,6 +87,8 @@ interface WithResourceGroupName {
interface WithLevel {
/**
* Specifies level.
* @param level The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it. Possible values include: 'NotSpecified', 'CanNotDelete', 'ReadOnly'
* @return the next definition stage
*/
WithCreate withLevel(LockLevel level);
}
Expand All @@ -95,6 +99,8 @@ interface WithLevel {
interface WithNotes {
/**
* Specifies notes.
* @param notes Notes about the lock. Maximum of 512 characters
* @return the next definition stage
*/
WithCreate withNotes(String notes);
}
Expand All @@ -105,6 +111,8 @@ interface WithNotes {
interface WithOwners {
/**
* Specifies owners.
* @param owners The owners of the lock
* @return the next definition stage
*/
WithCreate withOwners(List<ManagementLockOwner> owners);
}
Expand Down Expand Up @@ -133,6 +141,8 @@ interface UpdateStages {
interface WithNotes {
/**
* Specifies notes.
* @param notes Notes about the lock. Maximum of 512 characters
* @return the next update stage
*/
Update withNotes(String notes);
}
Expand All @@ -143,6 +153,8 @@ interface WithNotes {
interface WithOwners {
/**
* Specifies owners.
* @param owners The owners of the lock
* @return the next update stage
*/
Update withOwners(List<ManagementLockOwner> owners);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,13 @@ public interface ManagementLocks extends SupportsCreating<ManagementLockObject.D
*/
Observable<ManagementLockObject> listAtResourceLevelAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName);

/**
* Gets all the management locks for a scope.
*
* @param scope The scope for the lock. When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}' for resources.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ManagementLockObject> listByScopeAsync(final String scope);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.locks.v2016_09_01;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.locks.v2016_09_01.implementation.LocksManager;
import com.microsoft.azure.management.locks.v2016_09_01.implementation.OperationInner;

/**
* Type representing Operation.
*/
public interface Operation extends HasInner<OperationInner>, HasManager<LocksManager> {
/**
* @return the display value.
*/
OperationDisplay display();

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

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.locks.v2016_09_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The object that represents the operation.
*/
public class OperationDisplay {
/**
* Service provider: Microsoft.Authorization.
*/
@JsonProperty(value = "provider")
private String provider;

/**
* Resource on which the operation is performed: Profile, endpoint, etc.
*/
@JsonProperty(value = "resource")
private String resource;

/**
* Operation type: Read, write, delete, etc.
*/
@JsonProperty(value = "operation")
private String operation;

/**
* Get service provider: Microsoft.Authorization.
*
* @return the provider value
*/
public String provider() {
return this.provider;
}

/**
* Set service provider: Microsoft.Authorization.
*
* @param provider the provider value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withProvider(String provider) {
this.provider = provider;
return this;
}

/**
* Get resource on which the operation is performed: Profile, endpoint, etc.
*
* @return the resource value
*/
public String resource() {
return this.resource;
}

/**
* Set resource on which the operation is performed: Profile, endpoint, etc.
*
* @param resource the resource value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withResource(String resource) {
this.resource = resource;
return this;
}

/**
* Get operation type: Read, write, delete, etc.
*
* @return the operation value
*/
public String operation() {
return this.operation;
}

/**
* Set operation type: Read, write, delete, etc.
*
* @param operation the operation value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withOperation(String operation) {
this.operation = operation;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* abc
*/

package com.microsoft.azure.management.locks.v2016_09_01.implementation;

import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.locks.v2016_09_01.AuthorizationOperations;
import rx.functions.Func1;
import rx.Observable;
import com.microsoft.azure.Page;
import com.microsoft.azure.management.locks.v2016_09_01.Operation;

class AuthorizationOperationsImpl extends WrapperImpl<AuthorizationOperationsInner> implements AuthorizationOperations {
private final LocksManager manager;

AuthorizationOperationsImpl(LocksManager manager) {
super(manager.inner().authorizationOperations());
this.manager = manager;
}

public LocksManager manager() {
return this.manager;
}

@Override
public Observable<Operation> listAsync() {
AuthorizationOperationsInner client = this.inner();
return client.listAsync()
.flatMapIterable(new Func1<Page<OperationInner>, Iterable<OperationInner>>() {
@Override
public Iterable<OperationInner> call(Page<OperationInner> page) {
return page.items();
}
})
.map(new Func1<OperationInner, Operation>() {
@Override
public Operation call(OperationInner inner) {
return new OperationImpl(inner, manager());
}
});
}

}
Loading