MICROSOFT.VOICESERVICES

CommunicationsGateways_CreateOrUpdate

enum_ApiBridgeActivationState := [ "enabled", "disabled" ]
enum_AutoGeneratedDomainNameLabelScope := [ "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", "NoReuse" ]
enum_CommunicationsPlatform := [ "OperatorConnect", "TeamsPhoneMobile", "TeamsDirectRouting" ]
enum_Connectivity := [ "PublicAddress" ]
enum_E911Type := [ "Standard", "DirectToEsrp" ]
enum_ManagedServiceIdentityType := [ "None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned" ]
enum_SkuTier := [ "Free", "Basic", "Standard", "Premium" ]
enum_TeamsCodecs := [ "PCMA", "PCMU", "G722", "G722_2", "SILK_8", "SILK_16" ]

valid {
    input.Body.properties.serviceLocations[_].name == STRING
    input.Body.properties.serviceLocations[_].primaryRegionProperties.operatorAddresses[_] == STRING
    input.Body.properties.serviceLocations[_].primaryRegionProperties.esrpAddresses[_] == STRING
    input.Body.properties.serviceLocations[_].primaryRegionProperties.allowedSignalingSourceAddressPrefixes[_] == STRING
    input.Body.properties.serviceLocations[_].primaryRegionProperties.allowedMediaSourceAddressPrefixes[_] == STRING
    input.Body.properties.connectivity == enum_Connectivity[_]
    input.Body.properties.codecs[_] == enum_TeamsCodecs[_]
    input.Body.properties.e911Type == enum_E911Type[_]
    input.Body.properties.platforms[_] == enum_CommunicationsPlatform[_]
    input.Body.properties.apiBridge.configureApiBridge == enum_ApiBridgeActivationState[_]
    input.Body.properties.apiBridge.allowedAddressPrefixes[_] == STRING
    input.Body.properties.autoGeneratedDomainNameLabelScope == enum_AutoGeneratedDomainNameLabelScope[_]
    input.Body.properties.teamsVoicemailPilotNumber == STRING
    input.Body.properties.onPremMcpEnabled == BOOLEAN
    input.Body.properties.integratedMcpEnabled == BOOLEAN
    input.Body.properties.emergencyDialStrings[_] == STRING
    input.Body.properties.dnsDelegations.delegations[_].domain == STRING
    input.Body.properties.customSipHeaders.headers[_].name == STRING
    input.Body.identity.type == enum_ManagedServiceIdentityType[_]
    input.Body.identity.userAssignedIdentities.STRING == {}
    input.Body.sku.name == STRING
    input.Body.sku.tier == enum_SkuTier[_]
    input.Body.sku.size == STRING
    input.Body.sku.family == STRING
    input.Body.sku.capacity == INTEGER
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

CommunicationsGateways_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

CommunicationsGateways_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

CommunicationsGateways_ListByResourceGroup

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

CommunicationsGateways_ListBySubscription

valid {
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

CommunicationsGateways_Update

enum_ManagedServiceIdentityType := [ "None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned" ]
enum_SkuTier := [ "Free", "Basic", "Standard", "Premium" ]

valid {
    input.Body.identity.type == enum_ManagedServiceIdentityType[_]
    input.Body.identity.userAssignedIdentities.STRING == {}
    input.Body.sku.name == STRING
    input.Body.sku.tier == enum_SkuTier[_]
    input.Body.sku.size == STRING
    input.Body.sku.family == STRING
    input.Body.sku.capacity == INTEGER
    input.Body.tags.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Contacts_CreateOrUpdate

valid {
    input.Body.properties.contactName == STRING
    input.Body.properties.phoneNumber == STRING
    input.Body.properties.email == STRING
    input.Body.properties.role == STRING
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.ReqMap.contactName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Contacts_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.ReqMap.contactName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Contacts_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.ReqMap.contactName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Contacts_ListByCommunicationsGateway

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Contacts_Update

valid {
    input.Body.tags.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.ReqMap.contactName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

NameAvailability_CheckLocal

valid {
    input.Body.name == STRING
    input.Body.type == STRING
    input.ReqMap.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

Operations_List

valid {
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

TestLines_CreateOrUpdate

enum_TestLinePurpose := [ "Manual", "Automated" ]

valid {
    input.Body.properties.phoneNumber == STRING
    input.Body.properties.purpose == enum_TestLinePurpose[_]
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.ReqMap.testLineName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

TestLines_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.ReqMap.testLineName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

TestLines_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.ReqMap.testLineName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

TestLines_ListByCommunicationsGateway

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

TestLines_Update

valid {
    input.Body.tags.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.communicationsGatewayName == STRING
    input.ReqMap.testLineName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}