Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/**
* 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.graphrbac;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Request parameters for adding a owner to an application.
*/
public class AddOwnerParameters {
/**
* Unmatched properties from the message are deserialized this collection.
*/
@JsonProperty(value = "")
private Map<String, Object> additionalProperties;

/**
* A owner object URL, such as
* "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd",
* where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and
* "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner
* (user, application, servicePrincipal, group) to be added.
*/
@JsonProperty(value = "url", required = true)
private String url;

/**
* Get unmatched properties from the message are deserialized this collection.
*
* @return the additionalProperties value
*/
public Map<String, Object> additionalProperties() {
return this.additionalProperties;
}

/**
* Set unmatched properties from the message are deserialized this collection.
*
* @param additionalProperties the additionalProperties value to set
* @return the AddOwnerParameters object itself.
*/
public AddOwnerParameters withAdditionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
return this;
}

/**
* Get a owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
*
* @return the url value
*/
public String url() {
return this.url;
}

/**
* Set a owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
*
* @param url the url value to set
* @return the AddOwnerParameters object itself.
*/
public AddOwnerParameters withUrl(String url) {
this.url = url;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
/**
* 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.graphrbac;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The AppRole model.
*/
public class AppRole {
/**
* Unique role identifier inside the appRoles collection.
*/
@JsonProperty(value = "id")
private String id;

/**
* Specifies whether this app role definition can be assigned to users and
* groups by setting to 'User', or to other applications (that are
* accessing this application in daemon service scenarios) by setting to
* 'Application', or to both.
*/
@JsonProperty(value = "allowedMemberTypes")
private List<String> allowedMemberTypes;

/**
* Permission help text that appears in the admin app assignment and
* consent experiences.
*/
@JsonProperty(value = "description")
private String description;

/**
* Display name for the permission that appears in the admin consent and
* app assignment experiences.
*/
@JsonProperty(value = "displayName")
private String displayName;

/**
* When creating or updating a role definition, this must be set to true
* (which is the default). To delete a role, this must first be set to
* false. At that point, in a subsequent call, this role may be removed.
*/
@JsonProperty(value = "isEnabled")
private Boolean isEnabled;

/**
* Specifies the value of the roles claim that the application should
* expect in the authentication and access tokens.
*/
@JsonProperty(value = "value")
private String value;

/**
* Get unique role identifier inside the appRoles collection.
*
* @return the id value
*/
public String id() {
return this.id;
}

/**
* Set unique role identifier inside the appRoles collection.
*
* @param id the id value to set
* @return the AppRole object itself.
*/
public AppRole withId(String id) {
this.id = id;
return this;
}

/**
* Get specifies whether this app role definition can be assigned to users and groups by setting to 'User', or to other applications (that are accessing this application in daemon service scenarios) by setting to 'Application', or to both.
*
* @return the allowedMemberTypes value
*/
public List<String> allowedMemberTypes() {
return this.allowedMemberTypes;
}

/**
* Set specifies whether this app role definition can be assigned to users and groups by setting to 'User', or to other applications (that are accessing this application in daemon service scenarios) by setting to 'Application', or to both.
*
* @param allowedMemberTypes the allowedMemberTypes value to set
* @return the AppRole object itself.
*/
public AppRole withAllowedMemberTypes(List<String> allowedMemberTypes) {
this.allowedMemberTypes = allowedMemberTypes;
return this;
}

/**
* Get permission help text that appears in the admin app assignment and consent experiences.
*
* @return the description value
*/
public String description() {
return this.description;
}

/**
* Set permission help text that appears in the admin app assignment and consent experiences.
*
* @param description the description value to set
* @return the AppRole object itself.
*/
public AppRole withDescription(String description) {
this.description = description;
return this;
}

/**
* Get display name for the permission that appears in the admin consent and app assignment experiences.
*
* @return the displayName value
*/
public String displayName() {
return this.displayName;
}

/**
* Set display name for the permission that appears in the admin consent and app assignment experiences.
*
* @param displayName the displayName value to set
* @return the AppRole object itself.
*/
public AppRole withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}

/**
* Get when creating or updating a role definition, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.
*
* @return the isEnabled value
*/
public Boolean isEnabled() {
return this.isEnabled;
}

/**
* Set when creating or updating a role definition, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.
*
* @param isEnabled the isEnabled value to set
* @return the AppRole object itself.
*/
public AppRole withIsEnabled(Boolean isEnabled) {
this.isEnabled = isEnabled;
return this;
}

/**
* Get specifies the value of the roles claim that the application should expect in the authentication and access tokens.
*
* @return the value value
*/
public String value() {
return this.value;
}

/**
* Set specifies the value of the roles claim that the application should expect in the authentication and access tokens.
*
* @param value the value value to set
* @return the AppRole object itself.
*/
public AppRole withValue(String value) {
this.value = value;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,9 @@

package com.microsoft.azure.graphrbac;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Request parameters for adding a owner to an application.
* The ApplicationAddOwnerParameters model.
*/
public class ApplicationAddOwnerParameters {
/**
* Unmatched properties from the message are deserialized this collection.
*/
@JsonProperty(value = "")
private Map<String, Object> additionalProperties;

/**
* A owner object URL, such as
* "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd",
* where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and
* "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner
* (user, application, servicePrincipal, group) to be added.
*/
@JsonProperty(value = "url", required = true)
private String url;

/**
* Get unmatched properties from the message are deserialized this collection.
*
* @return the additionalProperties value
*/
public Map<String, Object> additionalProperties() {
return this.additionalProperties;
}

/**
* Set unmatched properties from the message are deserialized this collection.
*
* @param additionalProperties the additionalProperties value to set
* @return the ApplicationAddOwnerParameters object itself.
*/
public ApplicationAddOwnerParameters withAdditionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
return this;
}

/**
* Get a owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
*
* @return the url value
*/
public String url() {
return this.url;
}

/**
* Set a owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
*
* @param url the url value to set
* @return the ApplicationAddOwnerParameters object itself.
*/
public ApplicationAddOwnerParameters withUrl(String url) {
this.url = url;
return this;
}

public class ApplicationAddOwnerParameters extends AddOwnerParameters {
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public class ApplicationCreateParameters {
@JsonProperty(value = "")
private Map<String, Object> additionalProperties;

/**
* The collection of application roles that an application may declare.
* These roles can be assigned to users, groups or service principals.
*/
@JsonProperty(value = "appRoles")
private List<AppRole> appRoles;

/**
* Whether the application is available to other tenants.
*/
Expand Down Expand Up @@ -101,6 +108,26 @@ public ApplicationCreateParameters withAdditionalProperties(Map<String, Object>
return this;
}

/**
* Get the collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
*
* @return the appRoles value
*/
public List<AppRole> appRoles() {
return this.appRoles;
}

/**
* Set the collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
*
* @param appRoles the appRoles value to set
* @return the ApplicationCreateParameters object itself.
*/
public ApplicationCreateParameters withAppRoles(List<AppRole> appRoles) {
this.appRoles = appRoles;
return this;
}

/**
* Get whether the application is available to other tenants.
*
Expand Down
Loading