Skip to content

Commit

Permalink
Automatic PR of restapi_auto_brjohnstmsft_update-search-mgmt-spec int…
Browse files Browse the repository at this point in the history
…o master (#1757)

* Generated from 6a31c5b2391c99143fb762d48d4ebc5120df358d

* Update version.py
  • Loading branch information
AutorestCI committed May 21, 2018
1 parent aa1e025 commit 24ad9a2
Show file tree
Hide file tree
Showing 22 changed files with 1,195 additions and 98 deletions.
6 changes: 6 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
from .sku import Sku
from .search_service import SearchService
from .resource import Resource
from .operation_display import OperationDisplay
from .operation import Operation
from .search_management_request_options import SearchManagementRequestOptions
from .operation_paged import OperationPaged
from .query_key_paged import QueryKeyPaged
from .search_service_paged import SearchServicePaged
from .search_management_client_enums import (
Expand All @@ -36,7 +39,10 @@
'Sku',
'SearchService',
'Resource',
'OperationDisplay',
'Operation',
'SearchManagementRequestOptions',
'OperationPaged',
'QueryKeyPaged',
'SearchServicePaged',
'UnavailableNameReason',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ class AdminKeyResult(Model):
}

def __init__(self):
super(AdminKeyResult, self).__init__()
self.primary_key = None
self.secondary_key = None
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ class CheckNameAvailabilityInput(Model):
type = "searchServices"

def __init__(self, name):
super(CheckNameAvailabilityInput, self).__init__()
self.name = name
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class CheckNameAvailabilityOutput(Model):
(incorrect length, unsupported characters, etc.). 'AlreadyExists'
indicates that the name is already in use and is therefore unavailable.
Possible values include: 'Invalid', 'AlreadyExists'
:vartype reason: str or :class:`UnavailableNameReason
<azure.mgmt.search.models.UnavailableNameReason>`
:vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason
:ivar message: A message that explains why the name is invalid and
provides resource naming requirements. Available only if 'Invalid' is
returned in the 'reason' property.
Expand All @@ -46,6 +45,7 @@ class CheckNameAvailabilityOutput(Model):
}

def __init__(self):
super(CheckNameAvailabilityOutput, self).__init__()
self.is_name_available = None
self.reason = None
self.message = None
41 changes: 41 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/operation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Operation(Model):
"""Describes a REST API operation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar name: The name of the operation. This name is of the form
{provider}/{resource}/{operation}.
:vartype name: str
:ivar display: The object that describes the operation.
:vartype display: ~azure.mgmt.search.models.OperationDisplay
"""

_validation = {
'name': {'readonly': True},
'display': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self):
super(Operation, self).__init__()
self.name = None
self.display = None
51 changes: 51 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/operation_display.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class OperationDisplay(Model):
"""The object that describes the operation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar provider: The friendly name of the resource provider.
:vartype provider: str
:ivar operation: The operation type: read, write, delete, listKeys/action,
etc.
:vartype operation: str
:ivar resource: The resource type on which the operation is performed.
:vartype resource: str
:ivar description: The friendly name of the operation.
:vartype description: str
"""

_validation = {
'provider': {'readonly': True},
'operation': {'readonly': True},
'resource': {'readonly': True},
'description': {'readonly': True},
}

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}

def __init__(self):
super(OperationDisplay, self).__init__()
self.provider = None
self.operation = None
self.resource = None
self.description = None
27 changes: 27 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/models/operation_paged.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------

from msrest.paging import Paged


class OperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`Operation <azure.mgmt.search.models.Operation>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Operation]'}
}

def __init__(self, *args, **kwargs):

super(OperationPaged, self).__init__(*args, **kwargs)
1 change: 1 addition & 0 deletions azure-mgmt-search/azure/mgmt/search/models/query_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ class QueryKey(Model):
}

def __init__(self):
super(QueryKey, self).__init__()
self.name = None
self.key = None
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class QueryKeyPaged(Paged):
"""
A paging container for iterating over a list of QueryKey object
A paging container for iterating over a list of :class:`QueryKey <azure.mgmt.search.models.QueryKey>` object
"""

_attribute_map = {
Expand Down
6 changes: 3 additions & 3 deletions azure-mgmt-search/azure/mgmt/search/models/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ class Resource(Model):
East US, Southeast Asia, and so forth).
:type location: str
:param tags: Tags to help categorize the resource in the Azure portal.
:type tags: dict
:type tags: dict[str, str]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
}

_attribute_map = {
Expand All @@ -48,7 +47,8 @@ class Resource(Model):
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, location, tags=None):
def __init__(self, location=None, tags=None):
super(Resource, self).__init__()
self.id = None
self.name = None
self.type = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ class SearchManagementRequestOptions(Model):
"""

def __init__(self, client_request_id=None):
super(SearchManagementRequestOptions, self).__init__()
self.client_request_id = client_request_id
18 changes: 7 additions & 11 deletions azure-mgmt-search/azure/mgmt/search/models/search_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SearchService(Resource):
East US, Southeast Asia, and so forth).
:type location: str
:param tags: Tags to help categorize the resource in the Azure portal.
:type tags: dict
:type tags: dict[str, str]
:param replica_count: The number of replicas in the Search service. If
specified, it must be a value between 1 and 12 inclusive for standard SKUs
or between 1 and 3 inclusive for basic SKU. Default value: 1 .
Expand All @@ -46,8 +46,7 @@ class SearchService(Resource):
any other SKU. For the standard3 SKU, the value is either 'default' or
'highDensity'. For all other SKUs, this value must be 'default'. Possible
values include: 'default', 'highDensity'. Default value: "default" .
:type hosting_mode: str or :class:`HostingMode
<azure.mgmt.search.models.HostingMode>`
:type hosting_mode: str or ~azure.mgmt.search.models.HostingMode
:ivar status: The status of the Search service. Possible values include:
'running': The Search service is running and no provisioning operations
are underway. 'provisioning': The Search service is being provisioned or
Expand All @@ -62,8 +61,7 @@ class SearchService(Resource):
underlying issue. Dedicated services in these states are still chargeable
based on the number of search units provisioned. Possible values include:
'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error'
:vartype status: str or :class:`SearchServiceStatus
<azure.mgmt.search.models.SearchServiceStatus>`
:vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus
:ivar status_details: The details of the Search service status.
:vartype status_details: str
:ivar provisioning_state: The state of the last provisioning operation
Expand All @@ -77,24 +75,22 @@ class SearchService(Resource):
to Create Search service. This is because the free service uses capacity
that is already set up. Possible values include: 'succeeded',
'provisioning', 'failed'
:vartype provisioning_state: str or :class:`ProvisioningState
<azure.mgmt.search.models.ProvisioningState>`
:vartype provisioning_state: str or
~azure.mgmt.search.models.ProvisioningState
:param sku: The SKU of the Search Service, which determines price tier and
capacity limits.
:type sku: :class:`Sku <azure.mgmt.search.models.Sku>`
:type sku: ~azure.mgmt.search.models.Sku
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'replica_count': {'maximum': 12, 'minimum': 1},
'partition_count': {'maximum': 12, 'minimum': 1},
'status': {'readonly': True},
'status_details': {'readonly': True},
'provisioning_state': {'readonly': True},
'sku': {'required': True},
}

_attribute_map = {
Expand All @@ -112,7 +108,7 @@ class SearchService(Resource):
'sku': {'key': 'sku', 'type': 'Sku'},
}

def __init__(self, location, sku, tags=None, replica_count=1, partition_count=1, hosting_mode="default"):
def __init__(self, location=None, tags=None, replica_count=1, partition_count=1, hosting_mode="default", sku=None):
super(SearchService, self).__init__(location=location, tags=tags)
self.replica_count = replica_count
self.partition_count = partition_count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class SearchServicePaged(Paged):
"""
A paging container for iterating over a list of SearchService object
A paging container for iterating over a list of :class:`SearchService <azure.mgmt.search.models.SearchService>` object
"""

_attribute_map = {
Expand Down
3 changes: 2 additions & 1 deletion azure-mgmt-search/azure/mgmt/search/models/sku.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ class Sku(Model):
partitions and 12 replicas (or up to 3 partitions with more indexes if you
also set the hostingMode property to 'highDensity'). Possible values
include: 'free', 'basic', 'standard', 'standard2', 'standard3'
:type name: str or :class:`SkuName <azure.mgmt.search.models.SkuName>`
:type name: str or ~azure.mgmt.search.models.SkuName
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'SkuName'},
}

def __init__(self, name=None):
super(Sku, self).__init__()
self.name = name
2 changes: 2 additions & 0 deletions azure-mgmt-search/azure/mgmt/search/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
# regenerated.
# --------------------------------------------------------------------------

from .operations import Operations
from .admin_keys_operations import AdminKeysOperations
from .query_keys_operations import QueryKeysOperations
from .services_operations import ServicesOperations

__all__ = [
'Operations',
'AdminKeysOperations',
'QueryKeysOperations',
'ServicesOperations',
Expand Down
Loading

0 comments on commit 24ad9a2

Please sign in to comment.