1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
|
package appinsights
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// 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.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"net/http"
)
// ApplicationType enumerates the values for application type.
type ApplicationType string
const (
// Other specifies the other state for application type.
Other ApplicationType = "other"
// Web specifies the web state for application type.
Web ApplicationType = "web"
)
// FlowType enumerates the values for flow type.
type FlowType string
const (
// Bluefield specifies the bluefield state for flow type.
Bluefield FlowType = "Bluefield"
)
// RequestSource enumerates the values for request source.
type RequestSource string
const (
// Rest specifies the rest state for request source.
Rest RequestSource = "rest"
)
// WebTestKind enumerates the values for web test kind.
type WebTestKind string
const (
// Multistep specifies the multistep state for web test kind.
Multistep WebTestKind = "multistep"
// Ping specifies the ping state for web test kind.
Ping WebTestKind = "ping"
)
// ApplicationInsightsComponent is an Application Insights component
// definition.
type ApplicationInsightsComponent struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Kind *string `json:"kind,omitempty"`
*ApplicationInsightsComponentProperties `json:"properties,omitempty"`
}
// ApplicationInsightsComponentListResult is describes the list of Application
// Insights Resources.
type ApplicationInsightsComponentListResult struct {
autorest.Response `json:"-"`
Value *[]ApplicationInsightsComponent `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// ApplicationInsightsComponentListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client ApplicationInsightsComponentListResult) ApplicationInsightsComponentListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// ApplicationInsightsComponentProperties is properties that define an
// Application Insights component resource.
type ApplicationInsightsComponentProperties struct {
ApplicationID *string `json:"ApplicationId,omitempty"`
AppID *string `json:"AppId,omitempty"`
ApplicationType ApplicationType `json:"Application_Type,omitempty"`
FlowType FlowType `json:"Flow_Type,omitempty"`
RequestSource RequestSource `json:"Request_Source,omitempty"`
InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
CreationDate *date.Time `json:"CreationDate,omitempty"`
TenantID *string `json:"TenantId,omitempty"`
HockeyAppID *string `json:"HockeyAppId,omitempty"`
HockeyAppToken *string `json:"HockeyAppToken,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
SamplingPercentage *float64 `json:"SamplingPercentage,omitempty"`
}
// ErrorResponse is error reponse indicates Insights service is not able to
// process the incoming request. The reason is provided in the error message.
type ErrorResponse struct {
Code *string `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
}
// Operation is cDN REST API operation
type Operation struct {
Name *string `json:"name,omitempty"`
Display *OperationDisplay `json:"display,omitempty"`
}
// OperationDisplay is the object that represents the operation.
type OperationDisplay struct {
Provider *string `json:"provider,omitempty"`
Resource *string `json:"resource,omitempty"`
Operation *string `json:"operation,omitempty"`
}
// OperationListResult is result of the request to list CDN operations. It
// contains a list of operations and a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
Value *[]Operation `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// Resource is an azure resource object
type Resource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
}
// TagsResource is a container holding only the Tags for a resource, allowing
// the user to update the tags on a WebTest instance.
type TagsResource struct {
Tags *map[string]*string `json:"tags,omitempty"`
}
// WebTest is an Application Insights web test definition.
type WebTest struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Kind WebTestKind `json:"kind,omitempty"`
*WebTestProperties `json:"properties,omitempty"`
}
// WebTestGeolocation is geo-physical location to run a web test from. You must
// specify one or more locations for the test to run from.
type WebTestGeolocation struct {
Location *string `json:"Id,omitempty"`
}
// WebTestListResult is a list of 0 or more Application Insights web test
// definitions.
type WebTestListResult struct {
autorest.Response `json:"-"`
Value *[]WebTest `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// WebTestListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client WebTestListResult) WebTestListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// WebTestProperties is metadata describing a web test for an Azure resource.
type WebTestProperties struct {
SyntheticMonitorID *string `json:"SyntheticMonitorId,omitempty"`
WebTestName *string `json:"Name,omitempty"`
Description *string `json:"Description,omitempty"`
Enabled *bool `json:"Enabled,omitempty"`
Frequency *int32 `json:"Frequency,omitempty"`
Timeout *int32 `json:"Timeout,omitempty"`
WebTestKind WebTestKind `json:"Kind,omitempty"`
RetryEnabled *bool `json:"RetryEnabled,omitempty"`
Locations *[]WebTestGeolocation `json:"Locations,omitempty"`
Configuration *WebTestPropertiesConfiguration `json:"Configuration,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// WebTestPropertiesConfiguration is an XML configuration specification for a
// WebTest.
type WebTestPropertiesConfiguration struct {
WebTest *string `json:"WebTest,omitempty"`
}
|