text: # Copyright © 2019 Splunk, Inc.
  #
  # Licensed under the Apache License, Version 2.0 (the "License"): you may
  # not use this file except in compliance with the License. You may obtain
  # a copy of the License at
  #
  # [http://www.apache.org/licenses/LICENSE-2.0]
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  # License for the specific language governing permissions and limitations
  # under the License.
  
  ############# This file is auto-generated.  Do not edit! #############
  
  """
      SDC Service: App Registry
  
      With the App Registry service in Splunk Cloud Services, you can create, update, and manage your apps.
  
      OpenAPI spec version: v1beta2.0 (recommended default)
      Generated by: https://openapi-generator.tech
  """
  
  
  from datetime import datetime
  from typing import List, Dict
  from splunk_sdk.common.sscmodel import SSCModel
  from splunk_sdk.base_client import dictify, inflate
  from enum import Enum
  
  
  
  class AppName(SSCModel):
  
      @staticmethod
      def _from_dict(model: dict) -> "AppName":
          instance = AppName.__new__(AppName)
          instance._attrs = model
          return instance
  
      def __init__(self, app_name: "str", **extra):
          """AppName"""
  
          self._attrs = dict()
          if app_name is not None:
              self._attrs["appName"] = app_name
          for k, v in extra.items():
              self._attrs[k] = v
  
      @property
      def app_name(self) -> "str":
          """ Gets the app_name of this AppName.
          """
          return self._attrs.get("appName")
  
      @app_name.setter
      def app_name(self, app_name: "str"):
          """Sets the app_name of this AppName.
  
  
          :param app_name: The app_name of this AppName.
          :type: str
          """
          if app_name is None:
              raise ValueError("Invalid value for `app_name`, must not be `None`")
          self._attrs["appName"] = app_name
  
      def to_dict(self):
          return {k: v for (k, v) in self._attrs.items() if v is not None}
  
  
  class AppResourceKind(str, Enum):
      WEB = "web"
      NATIVE = "native"
      SERVICE = "service"
  
      @staticmethod
      def from_value(value: str):
          if value == "web":
              return AppResourceKind.WEB
          if value == "native":
              return AppResourceKind.NATIVE
          if value == "service":
              return AppResourceKind.SERVICE
  
  
  class AppResponseCreateUpdate(SSCModel):
  
      @staticmethod
      def _from_dict(model: dict) -> "AppResponseCreateUpdate":
          instance = AppResponseCreateUpdate.__new__(AppResponseCreateUpdate)
          instance._attrs = model
          return instance
  
      def __init__(self, client_id: "str", client_secret: "str", created_at: "datetime", created_by: "str", kind: "AppResourceKind", name: "str", title: "str", app_principal_permissions: "List[str]" = None, description: "str" = None, login_url: "str" = None, logo_url: "str" = None, redirect_urls: "List[str]" = None, setup_url: "str" = None, user_permissions_filter: "List[str]" = None, webhook_url: "str" = None, **extra):
          """AppResponseCreateUpdate"""
  
          self._attrs = dict()
          if client_id is not None:
              self._attrs["clientId"] = client_id
          if client_secret is not None:
              self._attrs["clientSecret"] = client_secret
          if created_at is not None:
              self._attrs["createdAt"] = created_at
          if created_by is not None:
              self._attrs["createdBy"] = created_by
          if kind is not None:
              self._attrs["kind"] = kind
          if name is not None:
              self._attrs["name"] = name
          if title is not None:
              self._attrs["title"] = title
          if app_principal_permissions is not None:
              self._attrs["appPrincipalPermissions"] = app_principal_permissions
          if description is not None:
              self._attrs["description"] = description
          if login_url is not None:
              self._attrs["loginUrl"] = login_url
          if logo_url is not None:
              self._attrs["logoUrl"] = logo_url
          if redirect_urls is not None:
              self._attrs["redirectUrls"] = redirect_urls
          if setup_url is not None:
              self._attrs["setupUrl"] = setup_url
          if user_permissions_filter is not None:
              self._attrs["userPermissionsFilter"] = user_permissions_filter
          if webhook_url is not None:
              self._attrs["webhookUrl"] = webhook_url
          for k, v in extra.items():
              self._attrs[k] = v
  
      @property
      def client_id(self) -> "str":
          """ Gets the client_id of this AppResponseCreateUpdate.
          OAuth 2.0 Client ID.
          """
          return self._attrs.get("clientId")
  
      @client_id.setter
      def client_id(self, client_id: "str"):
          """Sets the client_id of this AppResponseCreateUpdate.
  
          OAuth 2.0 Client ID.
  
          :param client_id: The client_id of this AppResponseCreateUpdate.
          :type: str
          """
          if client_id is None:
              raise ValueError("Invalid value for `client_id`, must not be `None`")
          self._attrs["clientId"] = client_id
  
      @property
      def client_secret(self) -> "str":
          """ Gets the client_secret of this AppResponseCreateUpdate.
          OAuth 2.0 Client Secret string (used for confidential clients).
          """
          return self._attrs.get("clientSecret")
  
      @client_secret.setter
      def client_secret(self, client_secret: "str"):
          """Sets the client_secret of this AppResponseCreateUpdate.
  
          OAuth 2.0 Client Secret string (used for confidential clients).
  
          :param client_secret: The client_secret of this AppResponseCreateUpdate.
          :type: str
          """
          if client_secret is None:
              raise ValueError("Invalid value for `client_secret`, must not be `None`")
          self._attrs["clientSecret"] = client_secret
  
      @property
      def created_at(self) -> "datetime":
          """ Gets the created_at of this AppResponseCreateUpdate.
          The date that the app was created.
          """
          return self._attrs.get("createdAt")
  
      @created_at.setter
      def created_at(self, created_at: "datetime"):
          """Sets the created_at of this AppResponseCreateUpdate.
  
          The date that the app was created.
  
          :param created_at: The created_at of this AppResponseCreateUpdate.
          :type: datetime
          """
          if created_at is None:
              raise ValueError("Invalid value for `created_at`, must not be `None`")
          self._attrs["createdAt"] = created_at
  
      @property
      def created_by(self) -> "str":
          """ Gets the created_by of this AppResponseCreateUpdate.
          The principal who created this app.
          """
          return self._attrs.get("createdBy")
  
      @created_by.setter
      def created_by(self, created_by: "str"):
          """Sets the created_by of this AppResponseCreateUpdate.
  
          The principal who created this app.
  
          :param created_by: The created_by of this AppResponseCreateUpdate.
          :type: str
          """
          if created_by is None:
              raise ValueError("Invalid value for `created_by`, must not be `None`")
          self._attrs["createdBy"] = created_by
  
      @property
      def kind(self) -> "AppResourceKind":
          """ Gets the kind of this AppResponseCreateUpdate.
          """
          return AppResourceKind.from_value(self._attrs.get("kind"))
  
      @kind.setter
      def kind(self, kind: "AppResourceKind"):
          """Sets the kind of this AppResponseCreateUpdate.
  
  
          :param kind: The kind of this AppResponseCreateUpdate.
          :type: AppResourceKind
          """
          if kind is None:
              raise ValueError("Invalid value for `kind`, must not be `None`")
          if isinstance(kind, Enum):
              self._attrs["kind"] = kind.value
          else:
              self._attrs["kind"] = kind  # If you supply a string, we presume you know the service will take it.
  
      @property
      def name(self) -> "str":
          """ Gets the name of this AppResponseCreateUpdate.
          App name that is unique within Splunk Cloud Platform.
          """
          return self._attrs.get("name")
  
      @name.setter
      def name(self, name: "str"):
          """Sets the name of this AppResponseCreateUpdate.
  
          App name that is unique within Splunk Cloud Platform.
  
          :param name: The name of this AppResponseCreateUpdate.
          :type: str
          """
          if name is None:
              raise ValueError("Invalid value for `name`, must not be `None`")
          self._attrs["name"] = name
  
      @property
      def title(self) -> "str":
          """ Gets the title of this AppResponseCreateUpdate.
          Human-readable title for the app.
          """
          return self._attrs.get("title")
  
      @title.setter
      def title(self, title: "str"):
          """Sets the title of this AppResponseCreateUpdate.
  
          Human-readable title for the app.
  
          :param title: The title of this AppResponseCreateUpdate.
          :type: str
          """
          if title is None:
              raise ValueError("Invalid value for `title`, must not be `None`")
          self._attrs["title"] = title
  
      @property
      def app_principal_permissions(self) -> "List[str]":
          """ Gets the app_principal_permissions of this AppResponseCreateUpdate.
          Array of permission templates that are used to grant permission to the app principal when a tenant subscribes.
          """
          return self._attrs.get("appPrincipalPermissions")
  
      @app_principal_permissions.setter
      def app_principal_permissions(self, app_principal_permissions: "List[str]"):
          """Sets the app_principal_permissions of this AppResponseCreateUpdate.
  
          Array of permission templates that are used to grant permission to the app principal when a tenant subscribes.
  
          :param app_principal_permissions: The app_principal_permissions of this AppResponseCreateUpdate.
          :type: List[str]
          """
          self._attrs["appPrincipalPermissions"] = app_principal_permissions
  
      @property
      def description(self) -> "str":
          """ Gets the description of this AppResponseCreateUpdate.
          Short paragraph describing the app.
          """
          return self._attrs.get("description")
  
      @description.setter
      def description(self, description: "str"):
          """Sets the description of this AppResponseCreateUpdate.
  
          Short paragraph describing the app.
  
          :param description: The description of this AppResponseCreateUpdate.
          :type: str
          """
          self._attrs["description"] = description
  
      @property
      def login_url(self) -> "str":
          """ Gets the login_url of this AppResponseCreateUpdate.
          The URL used to log in to the app.
          """
          return self._attrs.get("loginUrl")
  
      @login_url.setter
      def login_url(self, login_url: "str"):
          """Sets the login_url of this AppResponseCreateUpdate.
  
          The URL used to log in to the app.
  
          :param login_url: The login_url of this AppResponseCreateUpdate.
          :type: str
          """
          self._attrs["loginUrl"] = login_url
  
      @property
      def logo_url(self) -> "str":
          """ Gets the logo_url of this AppResponseCreateUpdate.
          The URL used to display the app's logo.
          """
          return self._attrs.get("logoUrl")
  
      @logo_url.setter
      def logo_url(self, logo_url: "str"):
          """Sets the logo_url of this AppResponseCreateUpdate.
  
          The URL used to display the app's logo.
  
          :param logo_url: The logo_url of this AppResponseCreateUpdate.
          :type: str
          """
          self._attrs["logoUrl"] = logo_url
  
      @property
      def redirect_urls(self) -> "List[str]":
          """ Gets the redirect_urls of this AppResponseCreateUpdate.
          Array of URLs that can be used for redirect after logging into the app.
          """
          return self._attrs.get("redirectUrls")
  
      @redirect_urls.setter
      def redirect_urls(self, redirect_urls: "List[str]"):
          """Sets the redirect_urls of this AppResponseCreateUpdate.
  
          Array of URLs that can be used for redirect after logging into the app.
  
          :param redirect_urls: The redirect_urls of this AppResponseCreateUpdate.
          :type: List[str]
          """
          self._attrs["redirectUrls"] = redirect_urls
  
      @property
      def setup_url(self) -> "str":
          """ Gets the setup_url of this AppResponseCreateUpdate.
          URL to redirect to after a subscription is created.
          """
          return self._attrs.get("setupUrl")
  
      @setup_url.setter
      def setup_url(self, setup_url: "str"):
          """Sets the setup_url of this AppResponseCreateUpdate.
  
          URL to redirect to after a subscription is created.
  
          :param setup_url: The setup_url of this AppResponseCreateUpdate.
          :type: str
          """
          self._attrs["setupUrl"] = setup_url
  
      @property
      def user_permissions_filter(self) -> "List[str]":
          """ Gets the user_permissions_filter of this AppResponseCreateUpdate.
          Array of permission filter templates that are used to intersect with a user's permissions when using the app.
          """
          return self._attrs.get("userPermissionsFilter")
  
      @user_permissions_filter.setter
      def user_permissions_filter(self, user_permissions_filter: "List[str]"):
          """Sets the user_permissions_filter of this AppResponseCreateUpdate.
  
          Array of permission filter templates that are used to intersect with a user's permissions when using the app.
  
          :param user_permissions_filter: The user_permissions_filter of this AppResponseCreateUpdate.
          :type: List[str]
          """
          self._attrs["userPermissionsFilter"] = user_permissions_filter
  
      @property
      def webhook_url(self) -> "str":
          """ Gets the webhook_url of this AppResponseCreateUpdate.
          URL that webhook events are sent to.
          """
          return self._attrs.get("webhookUrl")
  
      @webhook_url.setter
      def webhook_url(self, webhook_url: "str"):
          """Sets the webhook_url of this AppResponseCreateUpdate.
  
          URL that webhook events are sent to.
  
          :param webhook_url: The webhook_url of this AppResponseCreateUpdate.
          :type: str
          """
          self._attrs["webhookUrl"] = webhook_url
  
      def to_dict(self):
          return {k: v for (k, v) in self._attrs.items() if v is not None}
  
  
  class AppResponseGetList(SSCModel):
  
      @staticmethod
      def _from_dict(model: dict) -> "AppResponseGetList":
          instance = AppResponseGetList.__new__(AppResponseGetList)
          instance._attrs = model
          return instance
  
      def __init__(self, client_id: "str", created_at: "datetime", created_by: "str", kind: "AppResourceKind", name: "str", title: "str", app_principal_permissions: "List[str]" = None, description: "str" = None, login_url: "str" = None, logo_url: "str" = None, redirect_urls: "List[str]" = None, setup_url: "str" = None, user_permissions_filter: "List[str]" = None, webhook_url: "str" = None, **extra):
          """AppResponseGetList"""
  
          self._attrs = dict()
          if client_id is not None:
              self._attrs["clientId"] = client_id
          if created_at is not None:
              self._attrs["createdAt"] = created_at
          if created_by is not None:
              self._attrs["createdBy"] = created_by
          if kind is not None:
              self._attrs["kind"] = kind
          if name is not None:
              self._attrs["name"] = name
          if title is not None:
              self._attrs["title"] = title
          if app_principal_permissions is not None:
              self._attrs["appPrincipalPermissions"] = app_principal_permissions
          if description is not None:
              self._attrs["description"] = description
          if login_url is not None:
              self._attrs["loginUrl"] = login_url
          if logo_url is not None:
              self._attrs["logoUrl"] = logo_url
          if redirect_urls is not None:
              self._attrs["redirectUrls"] = redirect_urls
          if setup_url is not None:
              self._attrs["setupUrl"] = setup_url
          if user_permissions_filter is not None:
              self._attrs["userPermissionsFilter"] = user_permissions_filter
          if webhook_url is not None:
              self._attrs["webhookUrl"] = webhook_url
          for k, v in extra.items():
              self._attrs[k] = v
  
      @property
      def client_id(self) -> "str":
          """ Gets the client_id of this AppResponseGetList.
          OAuth 2.0 Client ID.
          """
          return self._attrs.get("clientId")
  
      @client_id.setter
      def client_id(self, client_id: "str"):
          """Sets the client_id of this AppResponseGetList.
  
          OAuth 2.0 Client ID.
  
          :param client_id: The client_id of this AppResponseGetList.
          :type: str
          """
          if client_id is None:
              raise ValueError("Invalid value for `client_id`, must not be `None`")
          self._attrs["clientId"] = client_id
  
      @property
      def created_at(self) -> "datetime":
          """ Gets the created_at of this AppResponseGetList.
          The date that the app was created.
          """
          return self._attrs.get("createdAt")
  
      @created_at.setter
      def created_at(self, created_at: "datetime"):
          """Sets the created_at of this AppResponseGetList.
  
          The date that the app was created.
  
          :param created_at: The created_at of this AppResponseGetList.
          :type: datetime
          """
          if created_at is None:
              raise ValueError("Invalid value for `created_at`, must not be `None`")
          self._attrs["createdAt"] = created_at
  
      @property
      def created_by(self) -> "str":
          """ Gets the created_by of this AppResponseGetList.
          The principal who created this app.
          """
          return self._attrs.get("createdBy")
  
      @created_by.setter
      def created_by(self, created_by: "str"):
          """Sets the created_by of this AppResponseGetList.
  
          The principal who created this app.
  
          :param created_by: The created_by of this AppResponseGetList.
          :type: str
          """
          if created_by is None:
              raise ValueError("Invalid value for `created_by`, must not be `None`")
          self._attrs["createdBy"] = created_by
  
      @property
      def kind(self) -> "AppResourceKind":
          """ Gets the kind of this AppResponseGetList.
          """
          return AppResourceKind.from_value(self._attrs.get("kind"))
  
      @kind.setter
      def kind(self, kind: "AppResourceKind"):
          """Sets the kind of this AppResponseGetList.
  
  
          :param kind: The kind of this AppResponseGetList.
          :type: AppResourceKind
          """
          if kind is None:
              raise ValueError("Invalid value for `kind`, must not be `None`")
          if isinstance(kind, Enum):
              self._attrs["kind"] = kind.value
          else:
              self._attrs["kind"] = kind  # If you supply a string, we presume you know the service will take it.
  
      @property
      def name(self) -> "str":
          """ Gets the name of this AppResponseGetList.
          App name that is unique within Splunk Cloud Platform.
          """
          return self._attrs.get("name")
  
      @name.setter
      def name(self, name: "str"):
          """Sets the name of this AppResponseGetList.
  
          App name that is unique within Splunk Cloud Platform.
  
          :param name: The name of this AppResponseGetList.
          :type: str
          """
          if name is None:
              raise ValueError("Invalid value for `name`, must not be `None`")
          self._attrs["name"] = name
  
      @property
      def title(self) -> "str":
          """ Gets the title of this AppResponseGetList.
          Human-readable title for the app.
          """
          return self._attrs.get("title")
  
      @title.setter
      def title(self, title: "str"):
          """Sets the title of this AppResponseGetList.
  
          Human-readable title for the app.
  
          :param title: The title of this AppResponseGetList.
          :type: str
          """
          if title is None:
              raise ValueError("Invalid value for `title`, must not be `None`")
          self._attrs["title"] = title
  
      @property
      def app_principal_permissions(self) -> "List[str]":
          """ Gets the app_principal_permissions of this AppResponseGetList.
          Array of permission templates that are used to grant permission to the app principal when a tenant subscribes.
          """
          return self._attrs.get("appPrincipalPermissions")
  
      @app_principal_permissions.setter
      def app_principal_permissions(self, app_principal_permissions: "List[str]"):
          """Sets the app_principal_permissions of this AppResponseGetList.
  
          Array of permission templates that are used to grant permission to the app principal when a tenant subscribes.
  
          :param app_principal_permissions: The app_principal_permissions of this AppResponseGetList.
          :type: List[str]
          """
          self._attrs["appPrincipalPermissions"] = app_principal_permissions
  
      @property
      def description(self) -> "str":
          """ Gets the description of this AppResponseGetList.
          Short paragraph describing the app.
          """
          return self._attrs.get("description")
  
      @description.setter
      def description(self, description: "str"):
          """Sets the description of this AppResponseGetList.
  
          Short paragraph describing the app.
  
          :param description: The description of this AppResponseGetList.
          :type: str
          """
          self._attrs["description"] = description
  
      @property
      def login_url(self) -> "str":
          """ Gets the login_url of this AppResponseGetList.
          The URL used to log in to the app.
          """
          return self._attrs.get("loginUrl")
  
      @login_url.setter
      def login_url(self, login_url: "str"):
          """Sets the login_url of this AppResponseGetList.
  
          The URL used to log in to the app.
  
          :param login_url: The login_url of this AppResponseGetList.
          :type: str
          """
          self._attrs["loginUrl"] = login_url
  
      @property
      def logo_url(self) -> "str":
          """ Gets the logo_url of this AppResponseGetList.
          The URL used to display the app's logo.
          """
          return self._attrs.get("logoUrl")
  
      @logo_url.setter
      def logo_url(self, logo_url: "str"):
          """Sets the logo_url of this AppResponseGetList.
  
          The URL used to display the app's logo.
  
          :param logo_url: The logo_url of this AppResponseGetList.
          :type: str
          """
          self._attrs["logoUrl"] = logo_url
  
      @property
      def redirect_urls(self) -> "List[str]":
          """ Gets the redirect_urls of this AppResponseGetList.
          Array of URLs that can be used for redirect after logging into the app.
          """
          return self._attrs.get("redirectUrls")
  
      @redirect_urls.setter
      def redirect_urls(self, redirect_urls: "List[str]"):
          """Sets the redirect_urls of this AppResponseGetList.
  
          Array of URLs that can be used for redirect after logging into the app.
  
          :param redirect_urls: The redirect_urls of this AppResponseGetList.
          :type: List[str]
          """
          self._attrs["redirectUrls"] = redirect_urls
  
      @property
      def setup_url(self) -> "str":
          """ Gets the setup_url of this AppResponseGetList.
          URL to redirect to after a subscription is created.
          """
          return self._attrs.get("setupUrl")
  
      @setup_url.setter
      def setup_url(self, setup_url: "str"):
          """Sets the setup_url of this AppResponseGetList.
  
          URL to redirect to after a subscription is created.
  
          :param setup_url: The setup_url of this AppResponseGetList.
          :type: str
          """
          self._attrs["setupUrl"] = setup_url
  
      @property
      def user_permissions_filter(self) -> "List[str]":
          """ Gets the user_permissions_filter of this AppResponseGetList.
          Array of permission filter templates that are used to intersect with a user's permissions when using the app.
          """
          return self._attrs.get("userPermissionsFilter")
  
      @user_permissions_filter.setter
      def user_permissions_filter(self, user_permissions_filter: "List[str]"):
          """Sets the user_permissions_filter of this AppResponseGetList.
  
          Array of permission filter templates that are used to intersect with a user's permissions when using the app.
  
          :param user_permissions_filter: The user_permissions_filter of this AppResponseGetList.
          :type: List[str]
          """
          self._attrs["userPermissionsFilter"] = user_permissions_filter
  
      @property
      def webhook_url(self) -> "str":
          """ Gets the webhook_url of this AppResponseGetList.
          URL that webhook events are sent to.
          """
          return self._attrs.get("webhookUrl")
  
      @webhook_url.setter
      def webhook_url(self, webhook_url: "str"):
          """Sets the webhook_url of this AppResponseGetList.
  
          URL that webhook events are sent to.
  
          :param webhook_url: The webhook_url of this AppResponseGetList.
          :type: str
          """
          self._attrs["webhookUrl"] = webhook_url
  
      def to_dict(self):
          return {k: v for (k, v) in self._attrs.items() if v is not None}
  
  
  class CreateAppRequest(SSCModel):
  
      @staticmethod
      def _from_dict(model: dict) -> "CreateAppRequest":
          instance = CreateAppRequest.__new__(CreateAppRequest)
          instance._attrs = model
          return instance
  
      def __init__(self, kind: "AppResourceKind", name: "str", title: "str", app_principal_permissions: "List[str]" = None, description: "str" = None, login_url: "str" = None, logo_url: "str" = None, redirect_urls: "List[str]" = None, setup_url: "str" = None, user_permissions_filter: "List[str]" = None, webhook_url: "str" = None, **extra):
          """CreateAppRequest"""
  
          self._attrs = dict()
          if kind is not None:
              self._attrs["kind"] = kind
          if name is not None:
              self._attrs["name"] = name
          if title is not None:
              self._attrs["title"] = title
          if app_principal_permissions is not None:
              self._attrs["appPrincipalPermissions"] = app_principal_permissions
          if description is not None:
              self._attrs["description"] = description
          if login_url is not None:
              self._attrs["loginUrl"] = login_url
          if logo_url is not None:
              self._attrs["logoUrl"] = logo_url
          if redirect_urls is not None:
              self._attrs["redirectUrls"] = redirect_urls
          if setup_url is not None:
              self._attrs["setupUrl"] = setup_url
          if user_permissions_filter is not None:
              self._attrs["userPermissionsFilter"] = user_permissions_filter
          if webhook_url is not None:
              self._attrs["webhookUrl"] = webhook_url
          for k, v in extra.items():
              self._attrs[k] = v
  
      @property
      def kind(self) -> "AppResourceKind":
          """ Gets the kind of this CreateAppRequest.
          """
          return AppResourceKind.from_value(self._attrs.get("kind"))
  
      @kind.setter
      def kind(self, kind: "AppResourceKind"):
          """Sets the kind of this CreateAppRequest.
  
  
          :param kind: The kind of this CreateAppRequest.
          :type: AppResourceKind
          """
          if kind is None:
              raise ValueError("Invalid value for `kind`, must not be `None`")
          if isinstance(kind, Enum):
              self._attrs["kind"] = kind.value
          else:
              self._attrs["kind"] = kind  # If you supply a string, we presume you know the service will take it.
  
      @property
      def name(self) -> "str":
          """ Gets the name of this CreateAppRequest.
          App name that is unique within Splunk Cloud Platform.
          """
          return self._attrs.get("name")
  
      @name.setter
      def name(self, name: "str"):
          """Sets the name of this CreateAppRequest.
  
          App name that is unique within Splunk Cloud Platform.
  
          :param name: The name of this CreateAppRequest.
          :type: str
          """
          if name is None:
              raise ValueError("Invalid value for `name`, must not be `None`")
          self._attrs["name"] = name
  
      @property
      def title(self) -> "str":
          """ Gets the title of this CreateAppRequest.
          Human-readable title for the app.
          """
          return self._attrs.get("title")
  
      @title.setter
      def title(self, title: "str"):
          """Sets the title of this CreateAppRequest.
  
          Human-readable title for the app.
  
          :param title: The title of this CreateAppRequest.
          :type: str
          """
          if title is None:
              raise ValueError("Invalid value for `title`, must not be `None`")
          self._attrs["title"] = title
  
      @property
      def app_principal_permissions(self) -> "List[str]":
          """ Gets the app_principal_permissions of this CreateAppRequest.
          Array of permission templates that are used to grant permission to the app principal when a tenant subscribes.
          """
          return self._attrs.get("appPrincipalPermissions")
  
      @app_principal_permissions.setter
      def app_principal_permissions(self, app_principal_permissions: "List[str]"):
          """Sets the app_principal_permissions of this CreateAppRequest.
  
          Array of permission templates that are used to grant permission to the app principal when a tenant subscribes.
  
          :param app_principal_permissions: The app_principal_permissions of this CreateAppRequest.
          :type: List[str]
          """
          self._attrs["appPrincipalPermissions"] = app_principal_permissions
  
      @property
      def description(self) -> "str":
          """ Gets the description of this CreateAppRequest.
          Short paragraph describing the app.
          """
          return self._attrs.get("description")
  
      @description.setter
      def description(self, description: "str"):
          """Sets the description of this CreateAppRequest.
  
          Short paragraph describing the app.
  
          :param description: The description of this CreateAppRequest.
          :type: str
          """
          self._attrs["description"] = description
  
      @property
      def login_url(self) -> "str":
          """ Gets the login_url of this CreateAppRequest.
          The URL used to log in to the app.
          """
          return self._attrs.get("loginUrl")
  
      @login_url.setter
      def login_url(self, login_url: "str"):
          """Sets the login_url of this CreateAppRequest.
  
          The URL used to log in to the app.
  
          :param login_url: The login_url of this CreateAppRequest.
          :type: str
          """
          self._attrs["loginUrl"] = login_url
  
      @property
      def logo_url(self) -> "str":
          """ Gets the logo_url of this CreateAppRequest.
          The URL used to display the app's logo.
          """
          return self._attrs.get("logoUrl")
  
      @logo_url.setter
      def logo_url(self, logo_url: "str"):
          """Sets the logo_url of this CreateAppRequest.
  
          The URL used to display the app's logo.
  
          :param logo_url: The logo_url of this CreateAppRequest.
          :type: str
          """
          self._attrs["logoUrl"] = logo_url
  
      @property
      def redirect_urls(self) -> "List[str]":
          """ Gets the redirect_urls of this CreateAppRequest.
          Array of URLs that can be used for redirect after logging into the app.
          """
          return self._attrs.get("redirectUrls")
  
      @redirect_urls.setter
      def redirect_urls(self, redirect_urls: "List[str]"):
          """Sets the redirect_urls of this CreateAppRequest.
  
          Array of URLs that can be used for redirect after logging into the app.
  
          :param redirect_urls: The redirect_urls of this CreateAppRequest.
          :type: List[str]
          """
          self._attrs["redirectUrls"] = redirect_urls
  
      @property
      def setup_url(self) -> "str":
          """ Gets the setup_url of this CreateAppRequest.
          URL to redirect to after a subscription is created.
          """
          return self._attrs.get("setupUrl")
  
      @setup_url.setter
      def setup_url(self, setup_url: "str"):
          """Sets the setup_url of this CreateAppRequest.
  
          URL to redirect to after a subscription is created.
  
          :param setup_url: The setup_url of this CreateAppRequest.
          :type: str
          """
          self._attrs["setupUrl"] = setup_url
  
      @property
      def user_permissions_filter(self) -> "List[str]":
          """ Gets the user_permissions_filter of this CreateAppRequest.
          Array of permission filter templates that are used to intersect with a user's permissions when using the app.
          """
          return self._attrs.get("userPermissionsFilter")
  
      @user_permissions_filter.setter
      def user_permissions_filter(self, user_permissions_filter: "List[str]"):
          """Sets the user_permissions_filter of this CreateAppRequest.
  
          Array of permission filter templates that are used to intersect with a user's permissions when using the app.
  
          :param user_permissions_filter: The user_permissions_filter of this CreateAppRequest.
          :type: List[str]
          """
          self._attrs["userPermissionsFilter"] = user_permissions_filter
  
      @property
      def webhook_url(self) -> "str":
          """ Gets the webhook_url of this CreateAppRequest.
          URL that webhook events are sent to.
          """
          return self._attrs.get("webhookUrl")
  
      @webhook_url.setter
      def webhook_url(self, webhook_url: "str"):
          """Sets the webhook_url of this CreateAppRequest.
  
          URL that webhook events are sent to.
  
          :param webhook_url: The webhook_url of this CreateAppRequest.
          :type: str
          """
          self._attrs["webhookUrl"] = webhook_url
  
      def to_dict(self):
          return {k: v for (k, v) in self._attrs.items() if v is not None}
  
  
  class Error(SSCModel):
  
      @staticmethod
      def _from_dict(model: dict) -> "Error":
          instance = Error.__new__(Error)
          instance._attrs = model
          return instance
  
      def __init__(self, code: "str", message: "str", **extra):
          """Error"""
  
          self._attrs = dict()
          if code is not None:
              self._attrs["code"] = code
          if message is not None:
              self._attrs["message"] = message
          for k, v in extra.items():
              self._attrs[k] = v
  
      @property
      def code(self) -> "str":
          """ Gets the code of this Error.
          """
          return self._attrs.get("code")
  
      @code.setter
      def code(self, code: "str"):
          """Sets the code of this Error.
  
  
          :param code: The code of this Error.
          :type: str
          """
          if code is None:
              raise ValueError("Invalid value for `code`, must not be `None`")
          self._attrs["code"] = code
  
      @property
      def message(self) -> "str":
          """ Gets the message of this Error.
          """
          return self._attrs.get("message")
  
      @message.setter
      def message(self, message: "str"):
          """Sets the message of this Error.
  
  
          :param message: The message of this Error.
          :type: str
          """
          if message is None:
              raise ValueError("Invalid value for `message`, must not be `None`")
          self._attrs["message"] = message
  
      def to_dict(self):
          return {k: v for (k, v) in self._attrs.items() if v is not None}
  
  
  class Key(SSCModel):
  
      @staticmethod
      def _from_dict(model: dict) -> "Key":
          instance = Key.__new__(Key)
          instance._attrs = model
          return instance
  
      def __init__(self, key: "str" = None, **extra):
          """Key"""
  
          self._attrs = dict()
          if key is not None:
              self._attrs["key"] = key
          for k, v in extra.items():
              self._attrs[k] = v
  
      @property
      def key(self) -> "str":
          """ Gets the key of this Key.
          Public key used for verifying signed webhook requests.
          """
          return self._attrs.get("key")
  
      @key.setter
      def key(self, key: "str"):
          """Sets the key of this Key.
  
          Public key used for verifying signed webhook requests.
  
          :param key: The key of this Key.
          :type: str
          """
          self._attrs["key"] = key
  
      def to_dict(self):
          return {k: v for (k, v) in self._attrs.items() if v is not None}
  
  
  class Subscription(SSCModel):
  
      @staticmethod
      def _from_dict(model: dict) -> "Subscription":
          instance = Subscription.__new__(Subscription)
          instance._attrs = model
          return instance
  
      def __init__(self, app_name: "str", created_at: "datetime", created_by: "str", description: "str", login_url: "str", logo_url: "str", title: "str", tenant: "str" = None, **extra):
          """Subscription"""
  
          self._attrs = dict()
          if app_name is not None:
              self._attrs["appName"] = app_name
          if created_at is not None:
              self._attrs["createdAt"] = created_at
          if created_by is not None:
              self._attrs["createdBy"] = created_by
          if description is not None:
              self._attrs["description"] = description
          if login_url is not None:
              self._attrs["loginUrl"] = login_url
          if logo_url is not None:
              self._attrs["logoUrl"] = logo_url
          if title is not None:
              self._attrs["title"] = title
          if tenant is not None:
              self._attrs["tenant"] = tenant
          for k, v in extra.items():
              self._attrs[k] = v
  
      @property
      def app_name(self) -> "str":
          """ Gets the app_name of this Subscription.
          App name.
          """
          return self._attrs.get("appName")
  
      @app_name.setter
      def app_name(self, app_name: "str"):
          """Sets the app_name of this Subscription.
  
          App name.
  
          :param app_name: The app_name of this Subscription.
          :type: str
          """
          if app_name is None:
              raise ValueError("Invalid value for `app_name`, must not be `None`")
          self._attrs["appName"] = app_name
  
      @property
      def created_at(self) -> "datetime":
          """ Gets the created_at of this Subscription.
          Time of subscription creation (UTC).
          """
          return self._attrs.get("createdAt")
  
      @created_at.setter
      def created_at(self, created_at: "datetime"):
          """Sets the created_at of this Subscription.
  
          Time of subscription creation (UTC).
  
          :param created_at: The created_at of this Subscription.
          :type: datetime
          """
          if created_at is None:
              raise ValueError("Invalid value for `created_at`, must not be `None`")
          self._attrs["createdAt"] = created_at
  
      @property
      def created_by(self) -> "str":
          """ Gets the created_by of this Subscription.
          The user who created the subscription.
          """
          return self._attrs.get("createdBy")
  
      @created_by.setter
      def created_by(self, created_by: "str"):
          """Sets the created_by of this Subscription.
  
          The user who created the subscription.
  
          :param created_by: The created_by of this Subscription.
          :type: str
          """
          if created_by is None:
              raise ValueError("Invalid value for `created_by`, must not be `None`")
          self._attrs["createdBy"] = created_by
  
      @property
      def description(self) -> "str":
          """ Gets the description of this Subscription.
          Short paragraph describing the app.
          """
          return self._attrs.get("description")
  
      @description.setter
      def description(self, description: "str"):
          """Sets the description of this Subscription.
  
          Short paragraph describing the app.
  
          :param description: The description of this Subscription.
          :type: str
          """
          if description is None:
              raise ValueError("Invalid value for `description`, must not be `None`")
          self._attrs["description"] = description
  
      @property
      def login_url(self) -> "str":
          """ Gets the login_url of this Subscription.
          URL used to login to the app.
          """
          return self._attrs.get("loginUrl")
  
      @login_url.setter
      def login_url(self, login_url: "str"):
          """Sets the login_url of this Subscription.
  
          URL used to login to the app.
  
          :param login_url: The login_url of this Subscription.
          :type: str
          """
          if login_url is None:
              raise ValueError("Invalid value for `login_url`, must not be `None`")
          self._attrs["loginUrl"] = login_url
  
      @property
      def logo_url(self) -> "str":
          """ Gets the logo_url of this Subscription.
          The URL used to display the app's logo.
          """
          return self._attrs.get("logoUrl")
  
      @logo_url.setter
      def logo_url(self, logo_url: "str"):
          """Sets the logo_url of this Subscription.
  
          The URL used to display the app's logo.
  
          :param logo_url: The logo_url of this Subscription.
          :type: str
          """
          if logo_url is None:
              raise ValueError("Invalid value for `logo_url`, must not be `None`")
          self._attrs["logoUrl"] = logo_url
  
      @property
      def title(self) -> "str":
          """ Gets the title of this Subscription.
          Human-readable name for the application.
          """
          return self._attrs.get("title")
  
      @title.setter
      def title(self, title: "str"):
          """Sets the title of this Subscription.
  
          Human-readable name for the application.
  
          :param title: The title of this Subscription.
          :type: str
          """
          if title is None:
              raise ValueError("Invalid value for `title`, must not be `None`")
          self._attrs["title"] = title
  
      @property
      def tenant(self) -> "str":
          """ Gets the tenant of this Subscription.
          The tenant that is subscribed to the app.
          """
          return self._attrs.get("tenant")
  
      @tenant.setter
      def tenant(self, tenant: "str"):
          """Sets the tenant of this Subscription.
  
          The tenant that is subscribed to the app.
  
          :param tenant: The tenant of this Subscription.
          :type: str
          """
          self._attrs["tenant"] = tenant
  
      def to_dict(self):
          return {k: v for (k, v) in self._attrs.items() if v is not None}
  
  
  class UpdateAppRequest(SSCModel):
  
      @staticmethod
      def _from_dict(model: dict) -> "UpdateAppRequest":
          instance = UpdateAppRequest.__new__(UpdateAppRequest)
          instance._attrs = model
          return instance
  
      def __init__(self, title: "str", app_principal_permissions: "List[str]" = None, description: "str" = None, login_url: "str" = None, logo_url: "str" = None, redirect_urls: "List[str]" = None, setup_url: "str" = None, user_permissions_filter: "List[str]" = None, webhook_url: "str" = None, **extra):
          """UpdateAppRequest"""
  
          self._attrs = dict()
          if title is not None:
              self._attrs["title"] = title
          if app_principal_permissions is not None:
              self._attrs["appPrincipalPermissions"] = app_principal_permissions
          if description is not None:
              self._attrs["description"] = description
          if login_url is not None:
              self._attrs["loginUrl"] = login_url
          if logo_url is not None:
              self._attrs["logoUrl"] = logo_url
          if redirect_urls is not None:
              self._attrs["redirectUrls"] = redirect_urls
          if setup_url is not None:
              self._attrs["setupUrl"] = setup_url
          if user_permissions_filter is not None:
              self._attrs["userPermissionsFilter"] = user_permissions_filter
          if webhook_url is not None:
              self._attrs["webhookUrl"] = webhook_url
          for k, v in extra.items():
              self._attrs[k] = v
  
      @property
      def title(self) -> "str":
          """ Gets the title of this UpdateAppRequest.
          Human-readable title for the app.
          """
          return self._attrs.get("title")
  
      @title.setter
      def title(self, title: "str"):
          """Sets the title of this UpdateAppRequest.
  
          Human-readable title for the app.
  
          :param title: The title of this UpdateAppRequest.
          :type: str
          """
          if title is None:
              raise ValueError("Invalid value for `title`, must not be `None`")
          self._attrs["title"] = title
  
      @property
      def app_principal_permissions(self) -> "List[str]":
          """ Gets the app_principal_permissions of this UpdateAppRequest.
          Array of permission templates that are used to grant permission to the app principal when a tenant subscribes.
          """
          return self._attrs.get("appPrincipalPermissions")
  
      @app_principal_permissions.setter
      def app_principal_permissions(self, app_principal_permissions: "List[str]"):
          """Sets the app_principal_permissions of this UpdateAppRequest.
  
          Array of permission templates that are used to grant permission to the app principal when a tenant subscribes.
  
          :param app_principal_permissions: The app_principal_permissions of this UpdateAppRequest.
          :type: List[str]
          """
          self._attrs["appPrincipalPermissions"] = app_principal_permissions
  
      @property
      def description(self) -> "str":
          """ Gets the description of this UpdateAppRequest.
          Short paragraph describing the app.
          """
          return self._attrs.get("description")
  
      @description.setter
      def description(self, description: "str"):
          """Sets the description of this UpdateAppRequest.
  
          Short paragraph describing the app.
  
          :param description: The description of this UpdateAppRequest.
          :type: str
          """
          self._attrs["description"] = description
  
      @property
      def login_url(self) -> "str":
          """ Gets the login_url of this UpdateAppRequest.
          The URL used to log in to the app.
          """
          return self._attrs.get("loginUrl")
  
      @login_url.setter
      def login_url(self, login_url: "str"):
          """Sets the login_url of this UpdateAppRequest.
  
          The URL used to log in to the app.
  
          :param login_url: The login_url of this UpdateAppRequest.
          :type: str
          """
          self._attrs["loginUrl"] = login_url
  
      @property
      def logo_url(self) -> "str":
          """ Gets the logo_url of this UpdateAppRequest.
          The URL used to display the app's logo.
          """
          return self._attrs.get("logoUrl")
  
      @logo_url.setter
      def logo_url(self, logo_url: "str"):
          """Sets the logo_url of this UpdateAppRequest.
  
          The URL used to display the app's logo.
  
          :param logo_url: The logo_url of this UpdateAppRequest.
          :type: str
          """
          self._attrs["logoUrl"] = logo_url
  
      @property
      def redirect_urls(self) -> "List[str]":
          """ Gets the redirect_urls of this UpdateAppRequest.
          Array of URLs that can be used for redirect after logging into the app.
          """
          return self._attrs.get("redirectUrls")
  
      @redirect_urls.setter
      def redirect_urls(self, redirect_urls: "List[str]"):
          """Sets the redirect_urls of this UpdateAppRequest.
  
          Array of URLs that can be used for redirect after logging into the app.
  
          :param redirect_urls: The redirect_urls of this UpdateAppRequest.
          :type: List[str]
          """
          self._attrs["redirectUrls"] = redirect_urls
  
      @property
      def setup_url(self) -> "str":
          """ Gets the setup_url of this UpdateAppRequest.
          URL to redirect to after a subscription is created.
          """
          return self._attrs.get("setupUrl")
  
      @setup_url.setter
      def setup_url(self, setup_url: "str"):
          """Sets the setup_url of this UpdateAppRequest.
  
          URL to redirect to after a subscription is created.
  
          :param setup_url: The setup_url of this UpdateAppRequest.
          :type: str
          """
          self._attrs["setupUrl"] = setup_url
  
      @property
      def user_permissions_filter(self) -> "List[str]":
          """ Gets the user_permissions_filter of this UpdateAppRequest.
          Array of permission filter templates that are used to intersect with a user's permissions when using the app.
          """
          return self._attrs.get("userPermissionsFilter")
  
      @user_permissions_filter.setter
      def user_permissions_filter(self, user_permissions_filter: "List[str]"):
          """Sets the user_permissions_filter of this UpdateAppRequest.
  
          Array of permission filter templates that are used to intersect with a user's permissions when using the app.
  
          :param user_permissions_filter: The user_permissions_filter of this UpdateAppRequest.
          :type: List[str]
          """
          self._attrs["userPermissionsFilter"] = user_permissions_filter
  
      @property
      def webhook_url(self) -> "str":
          """ Gets the webhook_url of this UpdateAppRequest.
          URL that webhook events are sent to.
          """
          return self._attrs.get("webhookUrl")
  
      @webhook_url.setter
      def webhook_url(self, webhook_url: "str"):
          """Sets the webhook_url of this UpdateAppRequest.
  
          URL that webhook events are sent to.
  
          :param webhook_url: The webhook_url of this UpdateAppRequest.
          :type: str
          """
          self._attrs["webhookUrl"] = webhook_url
  
      def to_dict(self):
          return {k: v for (k, v) in self._attrs.items() if v is not None}
  