/*
 * 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.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * Request parameters for creating a new application.
 *
 */
class ApplicationCreateParameters {
  /**
   * Create a ApplicationCreateParameters.
   * @member {array} [appRoles] The collection of application roles that an
   * application may declare. These roles can be assigned to users, groups or
   * service principals.
   * @member {boolean} availableToOtherTenants Whether the application is
   * available to other tenants.
   * @member {string} displayName The display name of the application.
   * @member {string} [homepage] The home page of the application.
   * @member {array} identifierUris A collection of URIs for the application.
   * @member {array} [replyUrls] A collection of reply URLs for the
   * application.
   * @member {array} [keyCredentials] The list of KeyCredential objects.
   * @member {array} [passwordCredentials] The list of PasswordCredential
   * objects.
   * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit
   * grant flow for OAuth2
   * @member {array} [requiredResourceAccess] Specifies resources that this
   * application requires access to and the set of OAuth permission scopes and
   * application roles that it needs under each of those resources. This
   * pre-configuration of required resource access drives the consent
   * experience.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ApplicationCreateParameters
   *
   * @returns {object} metadata of ApplicationCreateParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationCreateParameters',
      type: {
        name: 'Composite',
        additionalProperties: {
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'ObjectElementType',
                type: {
                  name: 'Object'
                }
            }
          }
        },
        className: 'ApplicationCreateParameters',
        modelProperties: {
          appRoles: {
            required: false,
            serializedName: 'appRoles',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'AppRoleElementType',
                  type: {
                    name: 'Composite',
                    className: 'AppRole'
                  }
              }
            }
          },
          availableToOtherTenants: {
            required: true,
            serializedName: 'availableToOtherTenants',
            type: {
              name: 'Boolean'
            }
          },
          displayName: {
            required: true,
            serializedName: 'displayName',
            type: {
              name: 'String'
            }
          },
          homepage: {
            required: false,
            serializedName: 'homepage',
            type: {
              name: 'String'
            }
          },
          identifierUris: {
            required: true,
            serializedName: 'identifierUris',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          replyUrls: {
            required: false,
            serializedName: 'replyUrls',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          keyCredentials: {
            required: false,
            serializedName: 'keyCredentials',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'KeyCredentialElementType',
                  type: {
                    name: 'Composite',
                    additionalProperties: {
                      type: {
                        name: 'Dictionary',
                        value: {
                            required: false,
                            serializedName: 'ObjectElementType',
                            type: {
                              name: 'Object'
                            }
                        }
                      }
                    },
                    className: 'KeyCredential'
                  }
              }
            }
          },
          passwordCredentials: {
            required: false,
            serializedName: 'passwordCredentials',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PasswordCredentialElementType',
                  type: {
                    name: 'Composite',
                    additionalProperties: {
                      type: {
                        name: 'Dictionary',
                        value: {
                            required: false,
                            serializedName: 'ObjectElementType',
                            type: {
                              name: 'Object'
                            }
                        }
                      }
                    },
                    className: 'PasswordCredential'
                  }
              }
            }
          },
          oauth2AllowImplicitFlow: {
            required: false,
            serializedName: 'oauth2AllowImplicitFlow',
            type: {
              name: 'Boolean'
            }
          },
          requiredResourceAccess: {
            required: false,
            serializedName: 'requiredResourceAccess',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RequiredResourceAccessElementType',
                  type: {
                    name: 'Composite',
                    additionalProperties: {
                      type: {
                        name: 'Dictionary',
                        value: {
                            required: false,
                            serializedName: 'ObjectElementType',
                            type: {
                              name: 'Object'
                            }
                        }
                      }
                    },
                    className: 'RequiredResourceAccess'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ApplicationCreateParameters;
