...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-09-01-preview/datacollection/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-09-01-preview/datacollection

     1  package datacollection
     2  
     3  // Copyright (c) Microsoft Corporation. All rights reserved.
     4  // Licensed under the MIT License. See License.txt in the project root for license information.
     5  //
     6  // Code generated by Microsoft (R) AutoRest Code Generator.
     7  // Changes may cause incorrect behavior and will be lost if the code is regenerated.
     8  
     9  import (
    10  	"context"
    11  	"encoding/json"
    12  	"github.com/Azure/go-autorest/autorest"
    13  	"github.com/Azure/go-autorest/autorest/date"
    14  	"github.com/Azure/go-autorest/autorest/to"
    15  	"github.com/Azure/go-autorest/tracing"
    16  	"net/http"
    17  )
    18  
    19  // The package's fully qualified name.
    20  const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-09-01-preview/datacollection"
    21  
    22  // AzureMonitorMetricsDestination azure Monitor Metrics destination.
    23  type AzureMonitorMetricsDestination struct {
    24  	// Name - A friendly name for the destination.
    25  	// This name should be unique across all destinations (regardless of type) within the data collection rule.
    26  	Name *string `json:"name,omitempty"`
    27  }
    28  
    29  // ColumnDefinition definition of custom data column.
    30  type ColumnDefinition struct {
    31  	// Name - The name of the column.
    32  	Name *string `json:"name,omitempty"`
    33  	// Type - The type of the column data. Possible values include: 'KnownColumnDefinitionTypeString', 'KnownColumnDefinitionTypeInt', 'KnownColumnDefinitionTypeLong', 'KnownColumnDefinitionTypeReal', 'KnownColumnDefinitionTypeBoolean', 'KnownColumnDefinitionTypeDatetime', 'KnownColumnDefinitionTypeDynamic'
    34  	Type KnownColumnDefinitionType `json:"type,omitempty"`
    35  }
    36  
    37  // ConfigurationAccessEndpointSpec definition of the endpoint used for accessing configuration.
    38  type ConfigurationAccessEndpointSpec struct {
    39  	// Endpoint - READ-ONLY; The endpoint. This property is READ-ONLY.
    40  	Endpoint *string `json:"endpoint,omitempty"`
    41  }
    42  
    43  // MarshalJSON is the custom marshaler for ConfigurationAccessEndpointSpec.
    44  func (caes ConfigurationAccessEndpointSpec) MarshalJSON() ([]byte, error) {
    45  	objectMap := make(map[string]interface{})
    46  	return json.Marshal(objectMap)
    47  }
    48  
    49  // DataFlow definition of which streams are sent to which destinations.
    50  type DataFlow struct {
    51  	// Streams - List of streams for this data flow.
    52  	Streams *[]KnownDataFlowStreams `json:"streams,omitempty"`
    53  	// Destinations - List of destinations for this data flow.
    54  	Destinations *[]string `json:"destinations,omitempty"`
    55  	// TransformKql - The KQL query to transform stream data.
    56  	TransformKql *string `json:"transformKql,omitempty"`
    57  	// OutputStream - The output stream of the transform. Only required if the transform changes data to a different stream.
    58  	OutputStream *string `json:"outputStream,omitempty"`
    59  }
    60  
    61  // DataSourcesSpec specification of data sources that will be collected.
    62  type DataSourcesSpec struct {
    63  	// PerformanceCounters - The list of performance counter data source configurations.
    64  	PerformanceCounters *[]PerfCounterDataSource `json:"performanceCounters,omitempty"`
    65  	// WindowsEventLogs - The list of Windows Event Log data source configurations.
    66  	WindowsEventLogs *[]WindowsEventLogDataSource `json:"windowsEventLogs,omitempty"`
    67  	// Syslog - The list of Syslog data source configurations.
    68  	Syslog *[]SyslogDataSource `json:"syslog,omitempty"`
    69  	// Extensions - The list of Azure VM extension data source configurations.
    70  	Extensions *[]ExtensionDataSource `json:"extensions,omitempty"`
    71  	// LogFiles - The list of Log files source configurations.
    72  	LogFiles *[]LogFilesDataSource `json:"logFiles,omitempty"`
    73  	// IisLogs - The list of IIS logs source configurations.
    74  	IisLogs *[]IisLogsDataSource `json:"iisLogs,omitempty"`
    75  }
    76  
    77  // DestinationsSpec specification of destinations that can be used in data flows.
    78  type DestinationsSpec struct {
    79  	// LogAnalytics - List of Log Analytics destinations.
    80  	LogAnalytics *[]LogAnalyticsDestination `json:"logAnalytics,omitempty"`
    81  	// AzureMonitorMetrics - Azure Monitor Metrics destination.
    82  	AzureMonitorMetrics *DestinationsSpecAzureMonitorMetrics `json:"azureMonitorMetrics,omitempty"`
    83  }
    84  
    85  // DestinationsSpecAzureMonitorMetrics azure Monitor Metrics destination.
    86  type DestinationsSpecAzureMonitorMetrics struct {
    87  	// Name - A friendly name for the destination.
    88  	// This name should be unique across all destinations (regardless of type) within the data collection rule.
    89  	Name *string `json:"name,omitempty"`
    90  }
    91  
    92  // Endpoint definition of data collection endpoint.
    93  type Endpoint struct {
    94  	// Description - Description of the data collection endpoint.
    95  	Description *string `json:"description,omitempty"`
    96  	// ImmutableID - The immutable ID of this data collection endpoint resource. This property is READ-ONLY.
    97  	ImmutableID *string `json:"immutableId,omitempty"`
    98  	// ConfigurationAccess - The endpoint used by clients to access their configuration.
    99  	ConfigurationAccess *EndpointConfigurationAccess `json:"configurationAccess,omitempty"`
   100  	// LogsIngestion - The endpoint used by clients to ingest logs.
   101  	LogsIngestion *EndpointLogsIngestion `json:"logsIngestion,omitempty"`
   102  	// NetworkAcls - Network access control rules for the endpoints.
   103  	NetworkAcls *EndpointNetworkAcls `json:"networkAcls,omitempty"`
   104  	// ProvisioningState - READ-ONLY; The resource provisioning state. This property is READ-ONLY. Possible values include: 'KnownDataCollectionEndpointProvisioningStateCreating', 'KnownDataCollectionEndpointProvisioningStateUpdating', 'KnownDataCollectionEndpointProvisioningStateDeleting', 'KnownDataCollectionEndpointProvisioningStateSucceeded', 'KnownDataCollectionEndpointProvisioningStateFailed'
   105  	ProvisioningState KnownDataCollectionEndpointProvisioningState `json:"provisioningState,omitempty"`
   106  }
   107  
   108  // MarshalJSON is the custom marshaler for Endpoint.
   109  func (e Endpoint) MarshalJSON() ([]byte, error) {
   110  	objectMap := make(map[string]interface{})
   111  	if e.Description != nil {
   112  		objectMap["description"] = e.Description
   113  	}
   114  	if e.ImmutableID != nil {
   115  		objectMap["immutableId"] = e.ImmutableID
   116  	}
   117  	if e.ConfigurationAccess != nil {
   118  		objectMap["configurationAccess"] = e.ConfigurationAccess
   119  	}
   120  	if e.LogsIngestion != nil {
   121  		objectMap["logsIngestion"] = e.LogsIngestion
   122  	}
   123  	if e.NetworkAcls != nil {
   124  		objectMap["networkAcls"] = e.NetworkAcls
   125  	}
   126  	return json.Marshal(objectMap)
   127  }
   128  
   129  // EndpointConfigurationAccess the endpoint used by clients to access their configuration.
   130  type EndpointConfigurationAccess struct {
   131  	// Endpoint - READ-ONLY; The endpoint. This property is READ-ONLY.
   132  	Endpoint *string `json:"endpoint,omitempty"`
   133  }
   134  
   135  // MarshalJSON is the custom marshaler for EndpointConfigurationAccess.
   136  func (eA EndpointConfigurationAccess) MarshalJSON() ([]byte, error) {
   137  	objectMap := make(map[string]interface{})
   138  	return json.Marshal(objectMap)
   139  }
   140  
   141  // EndpointLogsIngestion the endpoint used by clients to ingest logs.
   142  type EndpointLogsIngestion struct {
   143  	// Endpoint - READ-ONLY; The endpoint. This property is READ-ONLY.
   144  	Endpoint *string `json:"endpoint,omitempty"`
   145  }
   146  
   147  // MarshalJSON is the custom marshaler for EndpointLogsIngestion.
   148  func (eI EndpointLogsIngestion) MarshalJSON() ([]byte, error) {
   149  	objectMap := make(map[string]interface{})
   150  	return json.Marshal(objectMap)
   151  }
   152  
   153  // EndpointNetworkAcls network access control rules for the endpoints.
   154  type EndpointNetworkAcls struct {
   155  	// PublicNetworkAccess - The configuration to set whether network access from public internet to the endpoints are allowed. Possible values include: 'KnownPublicNetworkAccessOptionsEnabled', 'KnownPublicNetworkAccessOptionsDisabled'
   156  	PublicNetworkAccess KnownPublicNetworkAccessOptions `json:"publicNetworkAccess,omitempty"`
   157  }
   158  
   159  // EndpointResource definition of ARM tracked top level resource.
   160  type EndpointResource struct {
   161  	autorest.Response `json:"-"`
   162  	// EndpointResourceProperties - Resource properties.
   163  	*EndpointResourceProperties `json:"properties,omitempty"`
   164  	// Location - The geo-location where the resource lives.
   165  	Location *string `json:"location,omitempty"`
   166  	// Tags - Resource tags.
   167  	Tags map[string]*string `json:"tags"`
   168  	// Kind - The kind of the resource. Possible values include: 'KnownDataCollectionEndpointResourceKindLinux', 'KnownDataCollectionEndpointResourceKindWindows'
   169  	Kind KnownDataCollectionEndpointResourceKind `json:"kind,omitempty"`
   170  	// ID - READ-ONLY; Fully qualified ID of the resource.
   171  	ID *string `json:"id,omitempty"`
   172  	// Name - READ-ONLY; The name of the resource.
   173  	Name *string `json:"name,omitempty"`
   174  	// Type - READ-ONLY; The type of the resource.
   175  	Type *string `json:"type,omitempty"`
   176  	// Etag - READ-ONLY; Resource entity tag (ETag).
   177  	Etag *string `json:"etag,omitempty"`
   178  	// SystemData - READ-ONLY; Metadata pertaining to creation and last modification of the resource.
   179  	SystemData *EndpointResourceSystemData `json:"systemData,omitempty"`
   180  }
   181  
   182  // MarshalJSON is the custom marshaler for EndpointResource.
   183  func (er EndpointResource) MarshalJSON() ([]byte, error) {
   184  	objectMap := make(map[string]interface{})
   185  	if er.EndpointResourceProperties != nil {
   186  		objectMap["properties"] = er.EndpointResourceProperties
   187  	}
   188  	if er.Location != nil {
   189  		objectMap["location"] = er.Location
   190  	}
   191  	if er.Tags != nil {
   192  		objectMap["tags"] = er.Tags
   193  	}
   194  	if er.Kind != "" {
   195  		objectMap["kind"] = er.Kind
   196  	}
   197  	return json.Marshal(objectMap)
   198  }
   199  
   200  // UnmarshalJSON is the custom unmarshaler for EndpointResource struct.
   201  func (er *EndpointResource) UnmarshalJSON(body []byte) error {
   202  	var m map[string]*json.RawMessage
   203  	err := json.Unmarshal(body, &m)
   204  	if err != nil {
   205  		return err
   206  	}
   207  	for k, v := range m {
   208  		switch k {
   209  		case "properties":
   210  			if v != nil {
   211  				var endpointResourceProperties EndpointResourceProperties
   212  				err = json.Unmarshal(*v, &endpointResourceProperties)
   213  				if err != nil {
   214  					return err
   215  				}
   216  				er.EndpointResourceProperties = &endpointResourceProperties
   217  			}
   218  		case "location":
   219  			if v != nil {
   220  				var location string
   221  				err = json.Unmarshal(*v, &location)
   222  				if err != nil {
   223  					return err
   224  				}
   225  				er.Location = &location
   226  			}
   227  		case "tags":
   228  			if v != nil {
   229  				var tags map[string]*string
   230  				err = json.Unmarshal(*v, &tags)
   231  				if err != nil {
   232  					return err
   233  				}
   234  				er.Tags = tags
   235  			}
   236  		case "kind":
   237  			if v != nil {
   238  				var kind KnownDataCollectionEndpointResourceKind
   239  				err = json.Unmarshal(*v, &kind)
   240  				if err != nil {
   241  					return err
   242  				}
   243  				er.Kind = kind
   244  			}
   245  		case "id":
   246  			if v != nil {
   247  				var ID string
   248  				err = json.Unmarshal(*v, &ID)
   249  				if err != nil {
   250  					return err
   251  				}
   252  				er.ID = &ID
   253  			}
   254  		case "name":
   255  			if v != nil {
   256  				var name string
   257  				err = json.Unmarshal(*v, &name)
   258  				if err != nil {
   259  					return err
   260  				}
   261  				er.Name = &name
   262  			}
   263  		case "type":
   264  			if v != nil {
   265  				var typeVar string
   266  				err = json.Unmarshal(*v, &typeVar)
   267  				if err != nil {
   268  					return err
   269  				}
   270  				er.Type = &typeVar
   271  			}
   272  		case "etag":
   273  			if v != nil {
   274  				var etag string
   275  				err = json.Unmarshal(*v, &etag)
   276  				if err != nil {
   277  					return err
   278  				}
   279  				er.Etag = &etag
   280  			}
   281  		case "systemData":
   282  			if v != nil {
   283  				var systemData EndpointResourceSystemData
   284  				err = json.Unmarshal(*v, &systemData)
   285  				if err != nil {
   286  					return err
   287  				}
   288  				er.SystemData = &systemData
   289  			}
   290  		}
   291  	}
   292  
   293  	return nil
   294  }
   295  
   296  // EndpointResourceListResult a pageable list of resources.
   297  type EndpointResourceListResult struct {
   298  	autorest.Response `json:"-"`
   299  	// Value - A list of resources.
   300  	Value *[]EndpointResource `json:"value,omitempty"`
   301  	// NextLink - The URL to use for getting the next set of results.
   302  	NextLink *string `json:"nextLink,omitempty"`
   303  }
   304  
   305  // EndpointResourceListResultIterator provides access to a complete listing of EndpointResource values.
   306  type EndpointResourceListResultIterator struct {
   307  	i    int
   308  	page EndpointResourceListResultPage
   309  }
   310  
   311  // NextWithContext advances to the next value.  If there was an error making
   312  // the request the iterator does not advance and the error is returned.
   313  func (iter *EndpointResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
   314  	if tracing.IsEnabled() {
   315  		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointResourceListResultIterator.NextWithContext")
   316  		defer func() {
   317  			sc := -1
   318  			if iter.Response().Response.Response != nil {
   319  				sc = iter.Response().Response.Response.StatusCode
   320  			}
   321  			tracing.EndSpan(ctx, sc, err)
   322  		}()
   323  	}
   324  	iter.i++
   325  	if iter.i < len(iter.page.Values()) {
   326  		return nil
   327  	}
   328  	err = iter.page.NextWithContext(ctx)
   329  	if err != nil {
   330  		iter.i--
   331  		return err
   332  	}
   333  	iter.i = 0
   334  	return nil
   335  }
   336  
   337  // Next advances to the next value.  If there was an error making
   338  // the request the iterator does not advance and the error is returned.
   339  // Deprecated: Use NextWithContext() instead.
   340  func (iter *EndpointResourceListResultIterator) Next() error {
   341  	return iter.NextWithContext(context.Background())
   342  }
   343  
   344  // NotDone returns true if the enumeration should be started or is not yet complete.
   345  func (iter EndpointResourceListResultIterator) NotDone() bool {
   346  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   347  }
   348  
   349  // Response returns the raw server response from the last page request.
   350  func (iter EndpointResourceListResultIterator) Response() EndpointResourceListResult {
   351  	return iter.page.Response()
   352  }
   353  
   354  // Value returns the current value or a zero-initialized value if the
   355  // iterator has advanced beyond the end of the collection.
   356  func (iter EndpointResourceListResultIterator) Value() EndpointResource {
   357  	if !iter.page.NotDone() {
   358  		return EndpointResource{}
   359  	}
   360  	return iter.page.Values()[iter.i]
   361  }
   362  
   363  // Creates a new instance of the EndpointResourceListResultIterator type.
   364  func NewEndpointResourceListResultIterator(page EndpointResourceListResultPage) EndpointResourceListResultIterator {
   365  	return EndpointResourceListResultIterator{page: page}
   366  }
   367  
   368  // IsEmpty returns true if the ListResult contains no values.
   369  func (erlr EndpointResourceListResult) IsEmpty() bool {
   370  	return erlr.Value == nil || len(*erlr.Value) == 0
   371  }
   372  
   373  // hasNextLink returns true if the NextLink is not empty.
   374  func (erlr EndpointResourceListResult) hasNextLink() bool {
   375  	return erlr.NextLink != nil && len(*erlr.NextLink) != 0
   376  }
   377  
   378  // endpointResourceListResultPreparer prepares a request to retrieve the next set of results.
   379  // It returns nil if no more results exist.
   380  func (erlr EndpointResourceListResult) endpointResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
   381  	if !erlr.hasNextLink() {
   382  		return nil, nil
   383  	}
   384  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   385  		autorest.AsJSON(),
   386  		autorest.AsGet(),
   387  		autorest.WithBaseURL(to.String(erlr.NextLink)))
   388  }
   389  
   390  // EndpointResourceListResultPage contains a page of EndpointResource values.
   391  type EndpointResourceListResultPage struct {
   392  	fn   func(context.Context, EndpointResourceListResult) (EndpointResourceListResult, error)
   393  	erlr EndpointResourceListResult
   394  }
   395  
   396  // NextWithContext advances to the next page of values.  If there was an error making
   397  // the request the page does not advance and the error is returned.
   398  func (page *EndpointResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
   399  	if tracing.IsEnabled() {
   400  		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointResourceListResultPage.NextWithContext")
   401  		defer func() {
   402  			sc := -1
   403  			if page.Response().Response.Response != nil {
   404  				sc = page.Response().Response.Response.StatusCode
   405  			}
   406  			tracing.EndSpan(ctx, sc, err)
   407  		}()
   408  	}
   409  	for {
   410  		next, err := page.fn(ctx, page.erlr)
   411  		if err != nil {
   412  			return err
   413  		}
   414  		page.erlr = next
   415  		if !next.hasNextLink() || !next.IsEmpty() {
   416  			break
   417  		}
   418  	}
   419  	return nil
   420  }
   421  
   422  // Next advances to the next page of values.  If there was an error making
   423  // the request the page does not advance and the error is returned.
   424  // Deprecated: Use NextWithContext() instead.
   425  func (page *EndpointResourceListResultPage) Next() error {
   426  	return page.NextWithContext(context.Background())
   427  }
   428  
   429  // NotDone returns true if the page enumeration should be started or is not yet complete.
   430  func (page EndpointResourceListResultPage) NotDone() bool {
   431  	return !page.erlr.IsEmpty()
   432  }
   433  
   434  // Response returns the raw server response from the last page request.
   435  func (page EndpointResourceListResultPage) Response() EndpointResourceListResult {
   436  	return page.erlr
   437  }
   438  
   439  // Values returns the slice of values for the current page or nil if there are no values.
   440  func (page EndpointResourceListResultPage) Values() []EndpointResource {
   441  	if page.erlr.IsEmpty() {
   442  		return nil
   443  	}
   444  	return *page.erlr.Value
   445  }
   446  
   447  // Creates a new instance of the EndpointResourceListResultPage type.
   448  func NewEndpointResourceListResultPage(cur EndpointResourceListResult, getNextPage func(context.Context, EndpointResourceListResult) (EndpointResourceListResult, error)) EndpointResourceListResultPage {
   449  	return EndpointResourceListResultPage{
   450  		fn:   getNextPage,
   451  		erlr: cur,
   452  	}
   453  }
   454  
   455  // EndpointResourceProperties resource properties.
   456  type EndpointResourceProperties struct {
   457  	// Description - Description of the data collection endpoint.
   458  	Description *string `json:"description,omitempty"`
   459  	// ImmutableID - The immutable ID of this data collection endpoint resource. This property is READ-ONLY.
   460  	ImmutableID *string `json:"immutableId,omitempty"`
   461  	// ConfigurationAccess - The endpoint used by clients to access their configuration.
   462  	ConfigurationAccess *EndpointConfigurationAccess `json:"configurationAccess,omitempty"`
   463  	// LogsIngestion - The endpoint used by clients to ingest logs.
   464  	LogsIngestion *EndpointLogsIngestion `json:"logsIngestion,omitempty"`
   465  	// NetworkAcls - Network access control rules for the endpoints.
   466  	NetworkAcls *EndpointNetworkAcls `json:"networkAcls,omitempty"`
   467  	// ProvisioningState - READ-ONLY; The resource provisioning state. This property is READ-ONLY. Possible values include: 'KnownDataCollectionEndpointProvisioningStateCreating', 'KnownDataCollectionEndpointProvisioningStateUpdating', 'KnownDataCollectionEndpointProvisioningStateDeleting', 'KnownDataCollectionEndpointProvisioningStateSucceeded', 'KnownDataCollectionEndpointProvisioningStateFailed'
   468  	ProvisioningState KnownDataCollectionEndpointProvisioningState `json:"provisioningState,omitempty"`
   469  }
   470  
   471  // MarshalJSON is the custom marshaler for EndpointResourceProperties.
   472  func (er EndpointResourceProperties) MarshalJSON() ([]byte, error) {
   473  	objectMap := make(map[string]interface{})
   474  	if er.Description != nil {
   475  		objectMap["description"] = er.Description
   476  	}
   477  	if er.ImmutableID != nil {
   478  		objectMap["immutableId"] = er.ImmutableID
   479  	}
   480  	if er.ConfigurationAccess != nil {
   481  		objectMap["configurationAccess"] = er.ConfigurationAccess
   482  	}
   483  	if er.LogsIngestion != nil {
   484  		objectMap["logsIngestion"] = er.LogsIngestion
   485  	}
   486  	if er.NetworkAcls != nil {
   487  		objectMap["networkAcls"] = er.NetworkAcls
   488  	}
   489  	return json.Marshal(objectMap)
   490  }
   491  
   492  // EndpointResourceSystemData metadata pertaining to creation and last modification of the resource.
   493  type EndpointResourceSystemData struct {
   494  	// CreatedBy - The identity that created the resource.
   495  	CreatedBy *string `json:"createdBy,omitempty"`
   496  	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
   497  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
   498  	// CreatedAt - The timestamp of resource creation (UTC).
   499  	CreatedAt *date.Time `json:"createdAt,omitempty"`
   500  	// LastModifiedBy - The identity that last modified the resource.
   501  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
   502  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
   503  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
   504  	// LastModifiedAt - The timestamp of resource last modification (UTC)
   505  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
   506  }
   507  
   508  // ErrorAdditionalInfo the resource management error additional info.
   509  type ErrorAdditionalInfo struct {
   510  	// Type - READ-ONLY; The additional info type.
   511  	Type *string `json:"type,omitempty"`
   512  	// Info - READ-ONLY; The additional info.
   513  	Info interface{} `json:"info,omitempty"`
   514  }
   515  
   516  // MarshalJSON is the custom marshaler for ErrorAdditionalInfo.
   517  func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
   518  	objectMap := make(map[string]interface{})
   519  	return json.Marshal(objectMap)
   520  }
   521  
   522  // ErrorDetail the error detail.
   523  type ErrorDetail struct {
   524  	// Code - READ-ONLY; The error code.
   525  	Code *string `json:"code,omitempty"`
   526  	// Message - READ-ONLY; The error message.
   527  	Message *string `json:"message,omitempty"`
   528  	// Target - READ-ONLY; The error target.
   529  	Target *string `json:"target,omitempty"`
   530  	// Details - READ-ONLY; The error details.
   531  	Details *[]ErrorDetail `json:"details,omitempty"`
   532  	// AdditionalInfo - READ-ONLY; The error additional info.
   533  	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
   534  }
   535  
   536  // MarshalJSON is the custom marshaler for ErrorDetail.
   537  func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
   538  	objectMap := make(map[string]interface{})
   539  	return json.Marshal(objectMap)
   540  }
   541  
   542  // ErrorResponseCommonV2 common error response for all Azure Resource Manager APIs to return error details
   543  // for failed operations. (This also follows the OData error response format.).
   544  type ErrorResponseCommonV2 struct {
   545  	// Error - The error object.
   546  	Error *ErrorDetail `json:"error,omitempty"`
   547  }
   548  
   549  // ExtensionDataSource definition of which data will be collected from a separate VM extension that
   550  // integrates with the Azure Monitor Agent.
   551  // Collected from either Windows and Linux machines, depending on which extension is defined.
   552  type ExtensionDataSource struct {
   553  	// Streams - List of streams that this data source will be sent to.
   554  	// A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to.
   555  	Streams *[]KnownExtensionDataSourceStreams `json:"streams,omitempty"`
   556  	// ExtensionName - The name of the VM extension.
   557  	ExtensionName *string `json:"extensionName,omitempty"`
   558  	// ExtensionSettings - The extension settings. The format is specific for particular extension.
   559  	ExtensionSettings interface{} `json:"extensionSettings,omitempty"`
   560  	// InputDataSources - The list of data sources this extension needs data from.
   561  	InputDataSources *[]string `json:"inputDataSources,omitempty"`
   562  	// Name - A friendly name for the data source.
   563  	// This name should be unique across all data sources (regardless of type) within the data collection rule.
   564  	Name *string `json:"name,omitempty"`
   565  }
   566  
   567  // IisLogsDataSource enables IIS logs to be collected by this data collection rule.
   568  type IisLogsDataSource struct {
   569  	// Streams - IIS streams
   570  	Streams *[]string `json:"streams,omitempty"`
   571  	// LogDirectories - Absolute paths file location
   572  	LogDirectories *[]string `json:"logDirectories,omitempty"`
   573  	// Name - A friendly name for the data source.
   574  	// This name should be unique across all data sources (regardless of type) within the data collection rule.
   575  	Name *string `json:"name,omitempty"`
   576  }
   577  
   578  // LogAnalyticsDestination log Analytics destination.
   579  type LogAnalyticsDestination struct {
   580  	// WorkspaceResourceID - The resource ID of the Log Analytics workspace.
   581  	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
   582  	// WorkspaceID - READ-ONLY; The Customer ID of the Log Analytics workspace.
   583  	WorkspaceID *string `json:"workspaceId,omitempty"`
   584  	// Name - A friendly name for the destination.
   585  	// This name should be unique across all destinations (regardless of type) within the data collection rule.
   586  	Name *string `json:"name,omitempty"`
   587  }
   588  
   589  // MarshalJSON is the custom marshaler for LogAnalyticsDestination.
   590  func (lad LogAnalyticsDestination) MarshalJSON() ([]byte, error) {
   591  	objectMap := make(map[string]interface{})
   592  	if lad.WorkspaceResourceID != nil {
   593  		objectMap["workspaceResourceId"] = lad.WorkspaceResourceID
   594  	}
   595  	if lad.Name != nil {
   596  		objectMap["name"] = lad.Name
   597  	}
   598  	return json.Marshal(objectMap)
   599  }
   600  
   601  // LogFilesDataSource definition of which custom log files will be collected by this data collection rule
   602  type LogFilesDataSource struct {
   603  	// Streams - List of streams that this data source will be sent to.
   604  	// A stream indicates what schema will be used for this data source
   605  	Streams *[]string `json:"streams,omitempty"`
   606  	// FilePatterns - File Patterns where the log files are located
   607  	FilePatterns *[]string `json:"filePatterns,omitempty"`
   608  	// Format - The data format of the log files
   609  	Format *string `json:"format,omitempty"`
   610  	// Settings - The log files specific settings.
   611  	Settings *LogFilesDataSourceSettings `json:"settings,omitempty"`
   612  	// Name - A friendly name for the data source.
   613  	// This name should be unique across all data sources (regardless of type) within the data collection rule.
   614  	Name *string `json:"name,omitempty"`
   615  }
   616  
   617  // LogFilesDataSourceSettings the log files specific settings.
   618  type LogFilesDataSourceSettings struct {
   619  	// Text - Text settings
   620  	Text *LogFileSettingsText `json:"text,omitempty"`
   621  }
   622  
   623  // LogFileSettings settings for different log file formats
   624  type LogFileSettings struct {
   625  	// Text - Text settings
   626  	Text *LogFileSettingsText `json:"text,omitempty"`
   627  }
   628  
   629  // LogFileSettingsText text settings
   630  type LogFileSettingsText struct {
   631  	// RecordStartTimestampFormat - One of the supported timestamp formats. Possible values include: 'KnownLogFileTextSettingsRecordStartTimestampFormatISO8601', 'KnownLogFileTextSettingsRecordStartTimestampFormatYYYYMMDDHHMMSS', 'KnownLogFileTextSettingsRecordStartTimestampFormatMDYYYYHHMMSSAMPM', 'KnownLogFileTextSettingsRecordStartTimestampFormatMonDDYYYYHHMMSS', 'KnownLogFileTextSettingsRecordStartTimestampFormatYyMMddHHmmss', 'KnownLogFileTextSettingsRecordStartTimestampFormatDdMMyyHHmmss', 'KnownLogFileTextSettingsRecordStartTimestampFormatMMMdhhmmss', 'KnownLogFileTextSettingsRecordStartTimestampFormatDdMMMyyyyHHmmsszzz', 'KnownLogFileTextSettingsRecordStartTimestampFormatYyyyMMDdTHHmmssK'
   632  	RecordStartTimestampFormat KnownLogFileTextSettingsRecordStartTimestampFormat `json:"recordStartTimestampFormat,omitempty"`
   633  }
   634  
   635  // LogFileTextSettings settings for text log files
   636  type LogFileTextSettings struct {
   637  	// RecordStartTimestampFormat - One of the supported timestamp formats. Possible values include: 'KnownLogFileTextSettingsRecordStartTimestampFormatISO8601', 'KnownLogFileTextSettingsRecordStartTimestampFormatYYYYMMDDHHMMSS', 'KnownLogFileTextSettingsRecordStartTimestampFormatMDYYYYHHMMSSAMPM', 'KnownLogFileTextSettingsRecordStartTimestampFormatMonDDYYYYHHMMSS', 'KnownLogFileTextSettingsRecordStartTimestampFormatYyMMddHHmmss', 'KnownLogFileTextSettingsRecordStartTimestampFormatDdMMyyHHmmss', 'KnownLogFileTextSettingsRecordStartTimestampFormatMMMdhhmmss', 'KnownLogFileTextSettingsRecordStartTimestampFormatDdMMMyyyyHHmmsszzz', 'KnownLogFileTextSettingsRecordStartTimestampFormatYyyyMMDdTHHmmssK'
   638  	RecordStartTimestampFormat KnownLogFileTextSettingsRecordStartTimestampFormat `json:"recordStartTimestampFormat,omitempty"`
   639  }
   640  
   641  // LogsIngestionEndpointSpec definition of the endpoint used for ingesting logs.
   642  type LogsIngestionEndpointSpec struct {
   643  	// Endpoint - READ-ONLY; The endpoint. This property is READ-ONLY.
   644  	Endpoint *string `json:"endpoint,omitempty"`
   645  }
   646  
   647  // MarshalJSON is the custom marshaler for LogsIngestionEndpointSpec.
   648  func (lies LogsIngestionEndpointSpec) MarshalJSON() ([]byte, error) {
   649  	objectMap := make(map[string]interface{})
   650  	return json.Marshal(objectMap)
   651  }
   652  
   653  // Metadata metadata about the resource
   654  type Metadata struct {
   655  	// ProvisionedBy - READ-ONLY; Azure offering managing this resource on-behalf-of customer.
   656  	ProvisionedBy *string `json:"provisionedBy,omitempty"`
   657  }
   658  
   659  // MarshalJSON is the custom marshaler for Metadata.
   660  func (mVar Metadata) MarshalJSON() ([]byte, error) {
   661  	objectMap := make(map[string]interface{})
   662  	return json.Marshal(objectMap)
   663  }
   664  
   665  // NetworkRuleSet definition of the network rules.
   666  type NetworkRuleSet struct {
   667  	// PublicNetworkAccess - The configuration to set whether network access from public internet to the endpoints are allowed. Possible values include: 'KnownPublicNetworkAccessOptionsEnabled', 'KnownPublicNetworkAccessOptionsDisabled'
   668  	PublicNetworkAccess KnownPublicNetworkAccessOptions `json:"publicNetworkAccess,omitempty"`
   669  }
   670  
   671  // PerfCounterDataSource definition of which performance counters will be collected and how they will be
   672  // collected by this data collection rule.
   673  // Collected from both Windows and Linux machines where the counter is present.
   674  type PerfCounterDataSource struct {
   675  	// Streams - List of streams that this data source will be sent to.
   676  	// A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to.
   677  	Streams *[]KnownPerfCounterDataSourceStreams `json:"streams,omitempty"`
   678  	// SamplingFrequencyInSeconds - The number of seconds between consecutive counter measurements (samples).
   679  	SamplingFrequencyInSeconds *int32 `json:"samplingFrequencyInSeconds,omitempty"`
   680  	// CounterSpecifiers - A list of specifier names of the performance counters you want to collect.
   681  	// Use a wildcard (*) to collect a counter for all instances.
   682  	// To get a list of performance counters on Windows, run the command 'typeperf'.
   683  	CounterSpecifiers *[]string `json:"counterSpecifiers,omitempty"`
   684  	// Name - A friendly name for the data source.
   685  	// This name should be unique across all data sources (regardless of type) within the data collection rule.
   686  	Name *string `json:"name,omitempty"`
   687  }
   688  
   689  // ResourceForUpdate definition of ARM tracked top level resource properties for update operation.
   690  type ResourceForUpdate struct {
   691  	// Tags - Resource tags.
   692  	Tags map[string]*string `json:"tags"`
   693  }
   694  
   695  // MarshalJSON is the custom marshaler for ResourceForUpdate.
   696  func (rfu ResourceForUpdate) MarshalJSON() ([]byte, error) {
   697  	objectMap := make(map[string]interface{})
   698  	if rfu.Tags != nil {
   699  		objectMap["tags"] = rfu.Tags
   700  	}
   701  	return json.Marshal(objectMap)
   702  }
   703  
   704  // Rule definition of what monitoring data to collect and where that data should be sent.
   705  type Rule struct {
   706  	// Description - Description of the data collection rule.
   707  	Description *string `json:"description,omitempty"`
   708  	// ImmutableID - READ-ONLY; The immutable ID of this data collection rule. This property is READ-ONLY.
   709  	ImmutableID *string `json:"immutableId,omitempty"`
   710  	// DataCollectionEndpointID - The resource ID of the data collection endpoint that this rule can be used with.
   711  	DataCollectionEndpointID *string `json:"dataCollectionEndpointId,omitempty"`
   712  	// Metadata - READ-ONLY; Metadata about the resource
   713  	Metadata *RuleMetadata `json:"metadata,omitempty"`
   714  	// StreamDeclarations - Declaration of custom streams used in this rule.
   715  	StreamDeclarations map[string]*StreamDeclaration `json:"streamDeclarations"`
   716  	// DataSources - The specification of data sources.
   717  	// This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.
   718  	DataSources *RuleDataSources `json:"dataSources,omitempty"`
   719  	// Destinations - The specification of destinations.
   720  	Destinations *RuleDestinations `json:"destinations,omitempty"`
   721  	// DataFlows - The specification of data flows.
   722  	DataFlows *[]DataFlow `json:"dataFlows,omitempty"`
   723  	// ProvisioningState - READ-ONLY; The resource provisioning state. Possible values include: 'KnownDataCollectionRuleProvisioningStateCreating', 'KnownDataCollectionRuleProvisioningStateUpdating', 'KnownDataCollectionRuleProvisioningStateDeleting', 'KnownDataCollectionRuleProvisioningStateSucceeded', 'KnownDataCollectionRuleProvisioningStateFailed'
   724  	ProvisioningState KnownDataCollectionRuleProvisioningState `json:"provisioningState,omitempty"`
   725  }
   726  
   727  // MarshalJSON is the custom marshaler for Rule.
   728  func (r Rule) MarshalJSON() ([]byte, error) {
   729  	objectMap := make(map[string]interface{})
   730  	if r.Description != nil {
   731  		objectMap["description"] = r.Description
   732  	}
   733  	if r.DataCollectionEndpointID != nil {
   734  		objectMap["dataCollectionEndpointId"] = r.DataCollectionEndpointID
   735  	}
   736  	if r.StreamDeclarations != nil {
   737  		objectMap["streamDeclarations"] = r.StreamDeclarations
   738  	}
   739  	if r.DataSources != nil {
   740  		objectMap["dataSources"] = r.DataSources
   741  	}
   742  	if r.Destinations != nil {
   743  		objectMap["destinations"] = r.Destinations
   744  	}
   745  	if r.DataFlows != nil {
   746  		objectMap["dataFlows"] = r.DataFlows
   747  	}
   748  	return json.Marshal(objectMap)
   749  }
   750  
   751  // RuleAssociation definition of association of a data collection rule with a monitored Azure resource.
   752  type RuleAssociation struct {
   753  	// Description - Description of the association.
   754  	Description *string `json:"description,omitempty"`
   755  	// DataCollectionRuleID - The resource ID of the data collection rule that is to be associated.
   756  	DataCollectionRuleID *string `json:"dataCollectionRuleId,omitempty"`
   757  	// DataCollectionEndpointID - The resource ID of the data collection endpoint that is to be associated.
   758  	DataCollectionEndpointID *string `json:"dataCollectionEndpointId,omitempty"`
   759  	// ProvisioningState - READ-ONLY; The resource provisioning state. Possible values include: 'KnownDataCollectionRuleAssociationProvisioningStateCreating', 'KnownDataCollectionRuleAssociationProvisioningStateUpdating', 'KnownDataCollectionRuleAssociationProvisioningStateDeleting', 'KnownDataCollectionRuleAssociationProvisioningStateSucceeded', 'KnownDataCollectionRuleAssociationProvisioningStateFailed'
   760  	ProvisioningState KnownDataCollectionRuleAssociationProvisioningState `json:"provisioningState,omitempty"`
   761  	// Metadata - READ-ONLY; Metadata about the resource
   762  	Metadata *RuleAssociationMetadata `json:"metadata,omitempty"`
   763  }
   764  
   765  // MarshalJSON is the custom marshaler for RuleAssociation.
   766  func (ra RuleAssociation) MarshalJSON() ([]byte, error) {
   767  	objectMap := make(map[string]interface{})
   768  	if ra.Description != nil {
   769  		objectMap["description"] = ra.Description
   770  	}
   771  	if ra.DataCollectionRuleID != nil {
   772  		objectMap["dataCollectionRuleId"] = ra.DataCollectionRuleID
   773  	}
   774  	if ra.DataCollectionEndpointID != nil {
   775  		objectMap["dataCollectionEndpointId"] = ra.DataCollectionEndpointID
   776  	}
   777  	return json.Marshal(objectMap)
   778  }
   779  
   780  // RuleAssociationMetadata metadata about the resource
   781  type RuleAssociationMetadata struct {
   782  	// ProvisionedBy - READ-ONLY; Azure offering managing this resource on-behalf-of customer.
   783  	ProvisionedBy *string `json:"provisionedBy,omitempty"`
   784  }
   785  
   786  // MarshalJSON is the custom marshaler for RuleAssociationMetadata.
   787  func (ra RuleAssociationMetadata) MarshalJSON() ([]byte, error) {
   788  	objectMap := make(map[string]interface{})
   789  	return json.Marshal(objectMap)
   790  }
   791  
   792  // RuleAssociationProxyOnlyResource definition of generic ARM proxy resource.
   793  type RuleAssociationProxyOnlyResource struct {
   794  	autorest.Response `json:"-"`
   795  	// RuleAssociationProxyOnlyResourceProperties - Resource properties.
   796  	*RuleAssociationProxyOnlyResourceProperties `json:"properties,omitempty"`
   797  	// ID - READ-ONLY; Fully qualified ID of the resource.
   798  	ID *string `json:"id,omitempty"`
   799  	// Name - READ-ONLY; The name of the resource.
   800  	Name *string `json:"name,omitempty"`
   801  	// Type - READ-ONLY; The type of the resource.
   802  	Type *string `json:"type,omitempty"`
   803  	// Etag - READ-ONLY; Resource entity tag (ETag).
   804  	Etag *string `json:"etag,omitempty"`
   805  	// SystemData - READ-ONLY; Metadata pertaining to creation and last modification of the resource.
   806  	SystemData *RuleAssociationProxyOnlyResourceSystemData `json:"systemData,omitempty"`
   807  }
   808  
   809  // MarshalJSON is the custom marshaler for RuleAssociationProxyOnlyResource.
   810  func (rapor RuleAssociationProxyOnlyResource) MarshalJSON() ([]byte, error) {
   811  	objectMap := make(map[string]interface{})
   812  	if rapor.RuleAssociationProxyOnlyResourceProperties != nil {
   813  		objectMap["properties"] = rapor.RuleAssociationProxyOnlyResourceProperties
   814  	}
   815  	return json.Marshal(objectMap)
   816  }
   817  
   818  // UnmarshalJSON is the custom unmarshaler for RuleAssociationProxyOnlyResource struct.
   819  func (rapor *RuleAssociationProxyOnlyResource) UnmarshalJSON(body []byte) error {
   820  	var m map[string]*json.RawMessage
   821  	err := json.Unmarshal(body, &m)
   822  	if err != nil {
   823  		return err
   824  	}
   825  	for k, v := range m {
   826  		switch k {
   827  		case "properties":
   828  			if v != nil {
   829  				var ruleAssociationProxyOnlyResourceProperties RuleAssociationProxyOnlyResourceProperties
   830  				err = json.Unmarshal(*v, &ruleAssociationProxyOnlyResourceProperties)
   831  				if err != nil {
   832  					return err
   833  				}
   834  				rapor.RuleAssociationProxyOnlyResourceProperties = &ruleAssociationProxyOnlyResourceProperties
   835  			}
   836  		case "id":
   837  			if v != nil {
   838  				var ID string
   839  				err = json.Unmarshal(*v, &ID)
   840  				if err != nil {
   841  					return err
   842  				}
   843  				rapor.ID = &ID
   844  			}
   845  		case "name":
   846  			if v != nil {
   847  				var name string
   848  				err = json.Unmarshal(*v, &name)
   849  				if err != nil {
   850  					return err
   851  				}
   852  				rapor.Name = &name
   853  			}
   854  		case "type":
   855  			if v != nil {
   856  				var typeVar string
   857  				err = json.Unmarshal(*v, &typeVar)
   858  				if err != nil {
   859  					return err
   860  				}
   861  				rapor.Type = &typeVar
   862  			}
   863  		case "etag":
   864  			if v != nil {
   865  				var etag string
   866  				err = json.Unmarshal(*v, &etag)
   867  				if err != nil {
   868  					return err
   869  				}
   870  				rapor.Etag = &etag
   871  			}
   872  		case "systemData":
   873  			if v != nil {
   874  				var systemData RuleAssociationProxyOnlyResourceSystemData
   875  				err = json.Unmarshal(*v, &systemData)
   876  				if err != nil {
   877  					return err
   878  				}
   879  				rapor.SystemData = &systemData
   880  			}
   881  		}
   882  	}
   883  
   884  	return nil
   885  }
   886  
   887  // RuleAssociationProxyOnlyResourceListResult a pageable list of resources.
   888  type RuleAssociationProxyOnlyResourceListResult struct {
   889  	autorest.Response `json:"-"`
   890  	// Value - A list of resources.
   891  	Value *[]RuleAssociationProxyOnlyResource `json:"value,omitempty"`
   892  	// NextLink - The URL to use for getting the next set of results.
   893  	NextLink *string `json:"nextLink,omitempty"`
   894  }
   895  
   896  // RuleAssociationProxyOnlyResourceListResultIterator provides access to a complete listing of
   897  // RuleAssociationProxyOnlyResource values.
   898  type RuleAssociationProxyOnlyResourceListResultIterator struct {
   899  	i    int
   900  	page RuleAssociationProxyOnlyResourceListResultPage
   901  }
   902  
   903  // NextWithContext advances to the next value.  If there was an error making
   904  // the request the iterator does not advance and the error is returned.
   905  func (iter *RuleAssociationProxyOnlyResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
   906  	if tracing.IsEnabled() {
   907  		ctx = tracing.StartSpan(ctx, fqdn+"/RuleAssociationProxyOnlyResourceListResultIterator.NextWithContext")
   908  		defer func() {
   909  			sc := -1
   910  			if iter.Response().Response.Response != nil {
   911  				sc = iter.Response().Response.Response.StatusCode
   912  			}
   913  			tracing.EndSpan(ctx, sc, err)
   914  		}()
   915  	}
   916  	iter.i++
   917  	if iter.i < len(iter.page.Values()) {
   918  		return nil
   919  	}
   920  	err = iter.page.NextWithContext(ctx)
   921  	if err != nil {
   922  		iter.i--
   923  		return err
   924  	}
   925  	iter.i = 0
   926  	return nil
   927  }
   928  
   929  // Next advances to the next value.  If there was an error making
   930  // the request the iterator does not advance and the error is returned.
   931  // Deprecated: Use NextWithContext() instead.
   932  func (iter *RuleAssociationProxyOnlyResourceListResultIterator) Next() error {
   933  	return iter.NextWithContext(context.Background())
   934  }
   935  
   936  // NotDone returns true if the enumeration should be started or is not yet complete.
   937  func (iter RuleAssociationProxyOnlyResourceListResultIterator) NotDone() bool {
   938  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
   939  }
   940  
   941  // Response returns the raw server response from the last page request.
   942  func (iter RuleAssociationProxyOnlyResourceListResultIterator) Response() RuleAssociationProxyOnlyResourceListResult {
   943  	return iter.page.Response()
   944  }
   945  
   946  // Value returns the current value or a zero-initialized value if the
   947  // iterator has advanced beyond the end of the collection.
   948  func (iter RuleAssociationProxyOnlyResourceListResultIterator) Value() RuleAssociationProxyOnlyResource {
   949  	if !iter.page.NotDone() {
   950  		return RuleAssociationProxyOnlyResource{}
   951  	}
   952  	return iter.page.Values()[iter.i]
   953  }
   954  
   955  // Creates a new instance of the RuleAssociationProxyOnlyResourceListResultIterator type.
   956  func NewRuleAssociationProxyOnlyResourceListResultIterator(page RuleAssociationProxyOnlyResourceListResultPage) RuleAssociationProxyOnlyResourceListResultIterator {
   957  	return RuleAssociationProxyOnlyResourceListResultIterator{page: page}
   958  }
   959  
   960  // IsEmpty returns true if the ListResult contains no values.
   961  func (raporlr RuleAssociationProxyOnlyResourceListResult) IsEmpty() bool {
   962  	return raporlr.Value == nil || len(*raporlr.Value) == 0
   963  }
   964  
   965  // hasNextLink returns true if the NextLink is not empty.
   966  func (raporlr RuleAssociationProxyOnlyResourceListResult) hasNextLink() bool {
   967  	return raporlr.NextLink != nil && len(*raporlr.NextLink) != 0
   968  }
   969  
   970  // ruleAssociationProxyOnlyResourceListResultPreparer prepares a request to retrieve the next set of results.
   971  // It returns nil if no more results exist.
   972  func (raporlr RuleAssociationProxyOnlyResourceListResult) ruleAssociationProxyOnlyResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
   973  	if !raporlr.hasNextLink() {
   974  		return nil, nil
   975  	}
   976  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
   977  		autorest.AsJSON(),
   978  		autorest.AsGet(),
   979  		autorest.WithBaseURL(to.String(raporlr.NextLink)))
   980  }
   981  
   982  // RuleAssociationProxyOnlyResourceListResultPage contains a page of RuleAssociationProxyOnlyResource
   983  // values.
   984  type RuleAssociationProxyOnlyResourceListResultPage struct {
   985  	fn      func(context.Context, RuleAssociationProxyOnlyResourceListResult) (RuleAssociationProxyOnlyResourceListResult, error)
   986  	raporlr RuleAssociationProxyOnlyResourceListResult
   987  }
   988  
   989  // NextWithContext advances to the next page of values.  If there was an error making
   990  // the request the page does not advance and the error is returned.
   991  func (page *RuleAssociationProxyOnlyResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
   992  	if tracing.IsEnabled() {
   993  		ctx = tracing.StartSpan(ctx, fqdn+"/RuleAssociationProxyOnlyResourceListResultPage.NextWithContext")
   994  		defer func() {
   995  			sc := -1
   996  			if page.Response().Response.Response != nil {
   997  				sc = page.Response().Response.Response.StatusCode
   998  			}
   999  			tracing.EndSpan(ctx, sc, err)
  1000  		}()
  1001  	}
  1002  	for {
  1003  		next, err := page.fn(ctx, page.raporlr)
  1004  		if err != nil {
  1005  			return err
  1006  		}
  1007  		page.raporlr = next
  1008  		if !next.hasNextLink() || !next.IsEmpty() {
  1009  			break
  1010  		}
  1011  	}
  1012  	return nil
  1013  }
  1014  
  1015  // Next advances to the next page of values.  If there was an error making
  1016  // the request the page does not advance and the error is returned.
  1017  // Deprecated: Use NextWithContext() instead.
  1018  func (page *RuleAssociationProxyOnlyResourceListResultPage) Next() error {
  1019  	return page.NextWithContext(context.Background())
  1020  }
  1021  
  1022  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1023  func (page RuleAssociationProxyOnlyResourceListResultPage) NotDone() bool {
  1024  	return !page.raporlr.IsEmpty()
  1025  }
  1026  
  1027  // Response returns the raw server response from the last page request.
  1028  func (page RuleAssociationProxyOnlyResourceListResultPage) Response() RuleAssociationProxyOnlyResourceListResult {
  1029  	return page.raporlr
  1030  }
  1031  
  1032  // Values returns the slice of values for the current page or nil if there are no values.
  1033  func (page RuleAssociationProxyOnlyResourceListResultPage) Values() []RuleAssociationProxyOnlyResource {
  1034  	if page.raporlr.IsEmpty() {
  1035  		return nil
  1036  	}
  1037  	return *page.raporlr.Value
  1038  }
  1039  
  1040  // Creates a new instance of the RuleAssociationProxyOnlyResourceListResultPage type.
  1041  func NewRuleAssociationProxyOnlyResourceListResultPage(cur RuleAssociationProxyOnlyResourceListResult, getNextPage func(context.Context, RuleAssociationProxyOnlyResourceListResult) (RuleAssociationProxyOnlyResourceListResult, error)) RuleAssociationProxyOnlyResourceListResultPage {
  1042  	return RuleAssociationProxyOnlyResourceListResultPage{
  1043  		fn:      getNextPage,
  1044  		raporlr: cur,
  1045  	}
  1046  }
  1047  
  1048  // RuleAssociationProxyOnlyResourceProperties resource properties.
  1049  type RuleAssociationProxyOnlyResourceProperties struct {
  1050  	// Description - Description of the association.
  1051  	Description *string `json:"description,omitempty"`
  1052  	// DataCollectionRuleID - The resource ID of the data collection rule that is to be associated.
  1053  	DataCollectionRuleID *string `json:"dataCollectionRuleId,omitempty"`
  1054  	// DataCollectionEndpointID - The resource ID of the data collection endpoint that is to be associated.
  1055  	DataCollectionEndpointID *string `json:"dataCollectionEndpointId,omitempty"`
  1056  	// ProvisioningState - READ-ONLY; The resource provisioning state. Possible values include: 'KnownDataCollectionRuleAssociationProvisioningStateCreating', 'KnownDataCollectionRuleAssociationProvisioningStateUpdating', 'KnownDataCollectionRuleAssociationProvisioningStateDeleting', 'KnownDataCollectionRuleAssociationProvisioningStateSucceeded', 'KnownDataCollectionRuleAssociationProvisioningStateFailed'
  1057  	ProvisioningState KnownDataCollectionRuleAssociationProvisioningState `json:"provisioningState,omitempty"`
  1058  	// Metadata - READ-ONLY; Metadata about the resource
  1059  	Metadata *RuleAssociationMetadata `json:"metadata,omitempty"`
  1060  }
  1061  
  1062  // MarshalJSON is the custom marshaler for RuleAssociationProxyOnlyResourceProperties.
  1063  func (rapor RuleAssociationProxyOnlyResourceProperties) MarshalJSON() ([]byte, error) {
  1064  	objectMap := make(map[string]interface{})
  1065  	if rapor.Description != nil {
  1066  		objectMap["description"] = rapor.Description
  1067  	}
  1068  	if rapor.DataCollectionRuleID != nil {
  1069  		objectMap["dataCollectionRuleId"] = rapor.DataCollectionRuleID
  1070  	}
  1071  	if rapor.DataCollectionEndpointID != nil {
  1072  		objectMap["dataCollectionEndpointId"] = rapor.DataCollectionEndpointID
  1073  	}
  1074  	return json.Marshal(objectMap)
  1075  }
  1076  
  1077  // RuleAssociationProxyOnlyResourceSystemData metadata pertaining to creation and last modification of the
  1078  // resource.
  1079  type RuleAssociationProxyOnlyResourceSystemData struct {
  1080  	// CreatedBy - The identity that created the resource.
  1081  	CreatedBy *string `json:"createdBy,omitempty"`
  1082  	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  1083  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
  1084  	// CreatedAt - The timestamp of resource creation (UTC).
  1085  	CreatedAt *date.Time `json:"createdAt,omitempty"`
  1086  	// LastModifiedBy - The identity that last modified the resource.
  1087  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
  1088  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  1089  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
  1090  	// LastModifiedAt - The timestamp of resource last modification (UTC)
  1091  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
  1092  }
  1093  
  1094  // RuleDataSources the specification of data sources.
  1095  // This property is optional and can be omitted if the rule is meant to be used via direct calls to the
  1096  // provisioned endpoint.
  1097  type RuleDataSources struct {
  1098  	// PerformanceCounters - The list of performance counter data source configurations.
  1099  	PerformanceCounters *[]PerfCounterDataSource `json:"performanceCounters,omitempty"`
  1100  	// WindowsEventLogs - The list of Windows Event Log data source configurations.
  1101  	WindowsEventLogs *[]WindowsEventLogDataSource `json:"windowsEventLogs,omitempty"`
  1102  	// Syslog - The list of Syslog data source configurations.
  1103  	Syslog *[]SyslogDataSource `json:"syslog,omitempty"`
  1104  	// Extensions - The list of Azure VM extension data source configurations.
  1105  	Extensions *[]ExtensionDataSource `json:"extensions,omitempty"`
  1106  	// LogFiles - The list of Log files source configurations.
  1107  	LogFiles *[]LogFilesDataSource `json:"logFiles,omitempty"`
  1108  	// IisLogs - The list of IIS logs source configurations.
  1109  	IisLogs *[]IisLogsDataSource `json:"iisLogs,omitempty"`
  1110  }
  1111  
  1112  // RuleDestinations the specification of destinations.
  1113  type RuleDestinations struct {
  1114  	// LogAnalytics - List of Log Analytics destinations.
  1115  	LogAnalytics *[]LogAnalyticsDestination `json:"logAnalytics,omitempty"`
  1116  	// AzureMonitorMetrics - Azure Monitor Metrics destination.
  1117  	AzureMonitorMetrics *DestinationsSpecAzureMonitorMetrics `json:"azureMonitorMetrics,omitempty"`
  1118  }
  1119  
  1120  // RuleMetadata metadata about the resource
  1121  type RuleMetadata struct {
  1122  	// ProvisionedBy - READ-ONLY; Azure offering managing this resource on-behalf-of customer.
  1123  	ProvisionedBy *string `json:"provisionedBy,omitempty"`
  1124  }
  1125  
  1126  // MarshalJSON is the custom marshaler for RuleMetadata.
  1127  func (r RuleMetadata) MarshalJSON() ([]byte, error) {
  1128  	objectMap := make(map[string]interface{})
  1129  	return json.Marshal(objectMap)
  1130  }
  1131  
  1132  // RuleResource definition of ARM tracked top level resource.
  1133  type RuleResource struct {
  1134  	autorest.Response `json:"-"`
  1135  	// RuleResourceProperties - Resource properties.
  1136  	*RuleResourceProperties `json:"properties,omitempty"`
  1137  	// Location - The geo-location where the resource lives.
  1138  	Location *string `json:"location,omitempty"`
  1139  	// Tags - Resource tags.
  1140  	Tags map[string]*string `json:"tags"`
  1141  	// Kind - The kind of the resource. Possible values include: 'KnownDataCollectionRuleResourceKindLinux', 'KnownDataCollectionRuleResourceKindWindows'
  1142  	Kind KnownDataCollectionRuleResourceKind `json:"kind,omitempty"`
  1143  	// ID - READ-ONLY; Fully qualified ID of the resource.
  1144  	ID *string `json:"id,omitempty"`
  1145  	// Name - READ-ONLY; The name of the resource.
  1146  	Name *string `json:"name,omitempty"`
  1147  	// Type - READ-ONLY; The type of the resource.
  1148  	Type *string `json:"type,omitempty"`
  1149  	// Etag - READ-ONLY; Resource entity tag (ETag).
  1150  	Etag *string `json:"etag,omitempty"`
  1151  	// SystemData - READ-ONLY; Metadata pertaining to creation and last modification of the resource.
  1152  	SystemData *RuleResourceSystemData `json:"systemData,omitempty"`
  1153  }
  1154  
  1155  // MarshalJSON is the custom marshaler for RuleResource.
  1156  func (rr RuleResource) MarshalJSON() ([]byte, error) {
  1157  	objectMap := make(map[string]interface{})
  1158  	if rr.RuleResourceProperties != nil {
  1159  		objectMap["properties"] = rr.RuleResourceProperties
  1160  	}
  1161  	if rr.Location != nil {
  1162  		objectMap["location"] = rr.Location
  1163  	}
  1164  	if rr.Tags != nil {
  1165  		objectMap["tags"] = rr.Tags
  1166  	}
  1167  	if rr.Kind != "" {
  1168  		objectMap["kind"] = rr.Kind
  1169  	}
  1170  	return json.Marshal(objectMap)
  1171  }
  1172  
  1173  // UnmarshalJSON is the custom unmarshaler for RuleResource struct.
  1174  func (rr *RuleResource) UnmarshalJSON(body []byte) error {
  1175  	var m map[string]*json.RawMessage
  1176  	err := json.Unmarshal(body, &m)
  1177  	if err != nil {
  1178  		return err
  1179  	}
  1180  	for k, v := range m {
  1181  		switch k {
  1182  		case "properties":
  1183  			if v != nil {
  1184  				var ruleResourceProperties RuleResourceProperties
  1185  				err = json.Unmarshal(*v, &ruleResourceProperties)
  1186  				if err != nil {
  1187  					return err
  1188  				}
  1189  				rr.RuleResourceProperties = &ruleResourceProperties
  1190  			}
  1191  		case "location":
  1192  			if v != nil {
  1193  				var location string
  1194  				err = json.Unmarshal(*v, &location)
  1195  				if err != nil {
  1196  					return err
  1197  				}
  1198  				rr.Location = &location
  1199  			}
  1200  		case "tags":
  1201  			if v != nil {
  1202  				var tags map[string]*string
  1203  				err = json.Unmarshal(*v, &tags)
  1204  				if err != nil {
  1205  					return err
  1206  				}
  1207  				rr.Tags = tags
  1208  			}
  1209  		case "kind":
  1210  			if v != nil {
  1211  				var kind KnownDataCollectionRuleResourceKind
  1212  				err = json.Unmarshal(*v, &kind)
  1213  				if err != nil {
  1214  					return err
  1215  				}
  1216  				rr.Kind = kind
  1217  			}
  1218  		case "id":
  1219  			if v != nil {
  1220  				var ID string
  1221  				err = json.Unmarshal(*v, &ID)
  1222  				if err != nil {
  1223  					return err
  1224  				}
  1225  				rr.ID = &ID
  1226  			}
  1227  		case "name":
  1228  			if v != nil {
  1229  				var name string
  1230  				err = json.Unmarshal(*v, &name)
  1231  				if err != nil {
  1232  					return err
  1233  				}
  1234  				rr.Name = &name
  1235  			}
  1236  		case "type":
  1237  			if v != nil {
  1238  				var typeVar string
  1239  				err = json.Unmarshal(*v, &typeVar)
  1240  				if err != nil {
  1241  					return err
  1242  				}
  1243  				rr.Type = &typeVar
  1244  			}
  1245  		case "etag":
  1246  			if v != nil {
  1247  				var etag string
  1248  				err = json.Unmarshal(*v, &etag)
  1249  				if err != nil {
  1250  					return err
  1251  				}
  1252  				rr.Etag = &etag
  1253  			}
  1254  		case "systemData":
  1255  			if v != nil {
  1256  				var systemData RuleResourceSystemData
  1257  				err = json.Unmarshal(*v, &systemData)
  1258  				if err != nil {
  1259  					return err
  1260  				}
  1261  				rr.SystemData = &systemData
  1262  			}
  1263  		}
  1264  	}
  1265  
  1266  	return nil
  1267  }
  1268  
  1269  // RuleResourceListResult a pageable list of resources.
  1270  type RuleResourceListResult struct {
  1271  	autorest.Response `json:"-"`
  1272  	// Value - A list of resources.
  1273  	Value *[]RuleResource `json:"value,omitempty"`
  1274  	// NextLink - The URL to use for getting the next set of results.
  1275  	NextLink *string `json:"nextLink,omitempty"`
  1276  }
  1277  
  1278  // RuleResourceListResultIterator provides access to a complete listing of RuleResource values.
  1279  type RuleResourceListResultIterator struct {
  1280  	i    int
  1281  	page RuleResourceListResultPage
  1282  }
  1283  
  1284  // NextWithContext advances to the next value.  If there was an error making
  1285  // the request the iterator does not advance and the error is returned.
  1286  func (iter *RuleResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
  1287  	if tracing.IsEnabled() {
  1288  		ctx = tracing.StartSpan(ctx, fqdn+"/RuleResourceListResultIterator.NextWithContext")
  1289  		defer func() {
  1290  			sc := -1
  1291  			if iter.Response().Response.Response != nil {
  1292  				sc = iter.Response().Response.Response.StatusCode
  1293  			}
  1294  			tracing.EndSpan(ctx, sc, err)
  1295  		}()
  1296  	}
  1297  	iter.i++
  1298  	if iter.i < len(iter.page.Values()) {
  1299  		return nil
  1300  	}
  1301  	err = iter.page.NextWithContext(ctx)
  1302  	if err != nil {
  1303  		iter.i--
  1304  		return err
  1305  	}
  1306  	iter.i = 0
  1307  	return nil
  1308  }
  1309  
  1310  // Next advances to the next value.  If there was an error making
  1311  // the request the iterator does not advance and the error is returned.
  1312  // Deprecated: Use NextWithContext() instead.
  1313  func (iter *RuleResourceListResultIterator) Next() error {
  1314  	return iter.NextWithContext(context.Background())
  1315  }
  1316  
  1317  // NotDone returns true if the enumeration should be started or is not yet complete.
  1318  func (iter RuleResourceListResultIterator) NotDone() bool {
  1319  	return iter.page.NotDone() && iter.i < len(iter.page.Values())
  1320  }
  1321  
  1322  // Response returns the raw server response from the last page request.
  1323  func (iter RuleResourceListResultIterator) Response() RuleResourceListResult {
  1324  	return iter.page.Response()
  1325  }
  1326  
  1327  // Value returns the current value or a zero-initialized value if the
  1328  // iterator has advanced beyond the end of the collection.
  1329  func (iter RuleResourceListResultIterator) Value() RuleResource {
  1330  	if !iter.page.NotDone() {
  1331  		return RuleResource{}
  1332  	}
  1333  	return iter.page.Values()[iter.i]
  1334  }
  1335  
  1336  // Creates a new instance of the RuleResourceListResultIterator type.
  1337  func NewRuleResourceListResultIterator(page RuleResourceListResultPage) RuleResourceListResultIterator {
  1338  	return RuleResourceListResultIterator{page: page}
  1339  }
  1340  
  1341  // IsEmpty returns true if the ListResult contains no values.
  1342  func (rrlr RuleResourceListResult) IsEmpty() bool {
  1343  	return rrlr.Value == nil || len(*rrlr.Value) == 0
  1344  }
  1345  
  1346  // hasNextLink returns true if the NextLink is not empty.
  1347  func (rrlr RuleResourceListResult) hasNextLink() bool {
  1348  	return rrlr.NextLink != nil && len(*rrlr.NextLink) != 0
  1349  }
  1350  
  1351  // ruleResourceListResultPreparer prepares a request to retrieve the next set of results.
  1352  // It returns nil if no more results exist.
  1353  func (rrlr RuleResourceListResult) ruleResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
  1354  	if !rrlr.hasNextLink() {
  1355  		return nil, nil
  1356  	}
  1357  	return autorest.Prepare((&http.Request{}).WithContext(ctx),
  1358  		autorest.AsJSON(),
  1359  		autorest.AsGet(),
  1360  		autorest.WithBaseURL(to.String(rrlr.NextLink)))
  1361  }
  1362  
  1363  // RuleResourceListResultPage contains a page of RuleResource values.
  1364  type RuleResourceListResultPage struct {
  1365  	fn   func(context.Context, RuleResourceListResult) (RuleResourceListResult, error)
  1366  	rrlr RuleResourceListResult
  1367  }
  1368  
  1369  // NextWithContext advances to the next page of values.  If there was an error making
  1370  // the request the page does not advance and the error is returned.
  1371  func (page *RuleResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
  1372  	if tracing.IsEnabled() {
  1373  		ctx = tracing.StartSpan(ctx, fqdn+"/RuleResourceListResultPage.NextWithContext")
  1374  		defer func() {
  1375  			sc := -1
  1376  			if page.Response().Response.Response != nil {
  1377  				sc = page.Response().Response.Response.StatusCode
  1378  			}
  1379  			tracing.EndSpan(ctx, sc, err)
  1380  		}()
  1381  	}
  1382  	for {
  1383  		next, err := page.fn(ctx, page.rrlr)
  1384  		if err != nil {
  1385  			return err
  1386  		}
  1387  		page.rrlr = next
  1388  		if !next.hasNextLink() || !next.IsEmpty() {
  1389  			break
  1390  		}
  1391  	}
  1392  	return nil
  1393  }
  1394  
  1395  // Next advances to the next page of values.  If there was an error making
  1396  // the request the page does not advance and the error is returned.
  1397  // Deprecated: Use NextWithContext() instead.
  1398  func (page *RuleResourceListResultPage) Next() error {
  1399  	return page.NextWithContext(context.Background())
  1400  }
  1401  
  1402  // NotDone returns true if the page enumeration should be started or is not yet complete.
  1403  func (page RuleResourceListResultPage) NotDone() bool {
  1404  	return !page.rrlr.IsEmpty()
  1405  }
  1406  
  1407  // Response returns the raw server response from the last page request.
  1408  func (page RuleResourceListResultPage) Response() RuleResourceListResult {
  1409  	return page.rrlr
  1410  }
  1411  
  1412  // Values returns the slice of values for the current page or nil if there are no values.
  1413  func (page RuleResourceListResultPage) Values() []RuleResource {
  1414  	if page.rrlr.IsEmpty() {
  1415  		return nil
  1416  	}
  1417  	return *page.rrlr.Value
  1418  }
  1419  
  1420  // Creates a new instance of the RuleResourceListResultPage type.
  1421  func NewRuleResourceListResultPage(cur RuleResourceListResult, getNextPage func(context.Context, RuleResourceListResult) (RuleResourceListResult, error)) RuleResourceListResultPage {
  1422  	return RuleResourceListResultPage{
  1423  		fn:   getNextPage,
  1424  		rrlr: cur,
  1425  	}
  1426  }
  1427  
  1428  // RuleResourceProperties resource properties.
  1429  type RuleResourceProperties struct {
  1430  	// Description - Description of the data collection rule.
  1431  	Description *string `json:"description,omitempty"`
  1432  	// ImmutableID - READ-ONLY; The immutable ID of this data collection rule. This property is READ-ONLY.
  1433  	ImmutableID *string `json:"immutableId,omitempty"`
  1434  	// DataCollectionEndpointID - The resource ID of the data collection endpoint that this rule can be used with.
  1435  	DataCollectionEndpointID *string `json:"dataCollectionEndpointId,omitempty"`
  1436  	// Metadata - READ-ONLY; Metadata about the resource
  1437  	Metadata *RuleMetadata `json:"metadata,omitempty"`
  1438  	// StreamDeclarations - Declaration of custom streams used in this rule.
  1439  	StreamDeclarations map[string]*StreamDeclaration `json:"streamDeclarations"`
  1440  	// DataSources - The specification of data sources.
  1441  	// This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.
  1442  	DataSources *RuleDataSources `json:"dataSources,omitempty"`
  1443  	// Destinations - The specification of destinations.
  1444  	Destinations *RuleDestinations `json:"destinations,omitempty"`
  1445  	// DataFlows - The specification of data flows.
  1446  	DataFlows *[]DataFlow `json:"dataFlows,omitempty"`
  1447  	// ProvisioningState - READ-ONLY; The resource provisioning state. Possible values include: 'KnownDataCollectionRuleProvisioningStateCreating', 'KnownDataCollectionRuleProvisioningStateUpdating', 'KnownDataCollectionRuleProvisioningStateDeleting', 'KnownDataCollectionRuleProvisioningStateSucceeded', 'KnownDataCollectionRuleProvisioningStateFailed'
  1448  	ProvisioningState KnownDataCollectionRuleProvisioningState `json:"provisioningState,omitempty"`
  1449  }
  1450  
  1451  // MarshalJSON is the custom marshaler for RuleResourceProperties.
  1452  func (rr RuleResourceProperties) MarshalJSON() ([]byte, error) {
  1453  	objectMap := make(map[string]interface{})
  1454  	if rr.Description != nil {
  1455  		objectMap["description"] = rr.Description
  1456  	}
  1457  	if rr.DataCollectionEndpointID != nil {
  1458  		objectMap["dataCollectionEndpointId"] = rr.DataCollectionEndpointID
  1459  	}
  1460  	if rr.StreamDeclarations != nil {
  1461  		objectMap["streamDeclarations"] = rr.StreamDeclarations
  1462  	}
  1463  	if rr.DataSources != nil {
  1464  		objectMap["dataSources"] = rr.DataSources
  1465  	}
  1466  	if rr.Destinations != nil {
  1467  		objectMap["destinations"] = rr.Destinations
  1468  	}
  1469  	if rr.DataFlows != nil {
  1470  		objectMap["dataFlows"] = rr.DataFlows
  1471  	}
  1472  	return json.Marshal(objectMap)
  1473  }
  1474  
  1475  // RuleResourceSystemData metadata pertaining to creation and last modification of the resource.
  1476  type RuleResourceSystemData struct {
  1477  	// CreatedBy - The identity that created the resource.
  1478  	CreatedBy *string `json:"createdBy,omitempty"`
  1479  	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  1480  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
  1481  	// CreatedAt - The timestamp of resource creation (UTC).
  1482  	CreatedAt *date.Time `json:"createdAt,omitempty"`
  1483  	// LastModifiedBy - The identity that last modified the resource.
  1484  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
  1485  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  1486  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
  1487  	// LastModifiedAt - The timestamp of resource last modification (UTC)
  1488  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
  1489  }
  1490  
  1491  // StreamDeclaration declaration of a custom stream.
  1492  type StreamDeclaration struct {
  1493  	// Columns - List of columns used by data in this stream.
  1494  	Columns *[]ColumnDefinition `json:"columns,omitempty"`
  1495  }
  1496  
  1497  // SyslogDataSource definition of which syslog data will be collected and how it will be collected.
  1498  // Only collected from Linux machines.
  1499  type SyslogDataSource struct {
  1500  	// Streams - List of streams that this data source will be sent to.
  1501  	// A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to.
  1502  	Streams *[]KnownSyslogDataSourceStreams `json:"streams,omitempty"`
  1503  	// FacilityNames - The list of facility names.
  1504  	FacilityNames *[]KnownSyslogDataSourceFacilityNames `json:"facilityNames,omitempty"`
  1505  	// LogLevels - The log levels to collect.
  1506  	LogLevels *[]KnownSyslogDataSourceLogLevels `json:"logLevels,omitempty"`
  1507  	// Name - A friendly name for the data source.
  1508  	// This name should be unique across all data sources (regardless of type) within the data collection rule.
  1509  	Name *string `json:"name,omitempty"`
  1510  }
  1511  
  1512  // SystemData metadata pertaining to creation and last modification of the resource.
  1513  type SystemData struct {
  1514  	// CreatedBy - The identity that created the resource.
  1515  	CreatedBy *string `json:"createdBy,omitempty"`
  1516  	// CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  1517  	CreatedByType CreatedByType `json:"createdByType,omitempty"`
  1518  	// CreatedAt - The timestamp of resource creation (UTC).
  1519  	CreatedAt *date.Time `json:"createdAt,omitempty"`
  1520  	// LastModifiedBy - The identity that last modified the resource.
  1521  	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
  1522  	// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
  1523  	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
  1524  	// LastModifiedAt - The timestamp of resource last modification (UTC)
  1525  	LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
  1526  }
  1527  
  1528  // WindowsEventLogDataSource definition of which Windows Event Log events will be collected and how they
  1529  // will be collected.
  1530  // Only collected from Windows machines.
  1531  type WindowsEventLogDataSource struct {
  1532  	// Streams - List of streams that this data source will be sent to.
  1533  	// A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to.
  1534  	Streams *[]KnownWindowsEventLogDataSourceStreams `json:"streams,omitempty"`
  1535  	// XPathQueries - A list of Windows Event Log queries in XPATH format.
  1536  	XPathQueries *[]string `json:"xPathQueries,omitempty"`
  1537  	// Name - A friendly name for the data source.
  1538  	// This name should be unique across all data sources (regardless of type) within the data collection rule.
  1539  	Name *string `json:"name,omitempty"`
  1540  }
  1541  

View as plain text