1// Package postgresql implements the Azure ARM Postgresql service API version 2017-12-01-preview.
2//
3// The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL
4// resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and
5// configurations with new business model.
6package postgresql
7
8// Copyright (c) Microsoft and contributors.  All rights reserved.
9//
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13// http://www.apache.org/licenses/LICENSE-2.0
14//
15// Unless required by applicable law or agreed to in writing, software
16// distributed under the License is distributed on an "AS IS" BASIS,
17// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18//
19// See the License for the specific language governing permissions and
20// limitations under the License.
21//
22// Code generated by Microsoft (R) AutoRest Code Generator.
23// Changes may cause incorrect behavior and will be lost if the code is regenerated.
24
25import (
26	"github.com/Azure/go-autorest/autorest"
27)
28
29const (
30	// DefaultBaseURI is the default URI used for the service Postgresql
31	DefaultBaseURI = "https://management.azure.com"
32)
33
34// BaseClient is the base client for Postgresql.
35type BaseClient struct {
36	autorest.Client
37	BaseURI        string
38	SubscriptionID string
39}
40
41// New creates an instance of the BaseClient client.
42func New(subscriptionID string) BaseClient {
43	return NewWithBaseURI(DefaultBaseURI, subscriptionID)
44}
45
46// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint.  Use this when interacting with
47// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
48func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
49	return BaseClient{
50		Client:         autorest.NewClientWithUserAgent(UserAgent()),
51		BaseURI:        baseURI,
52		SubscriptionID: subscriptionID,
53	}
54}
55