1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4// Object Storage Service API 5// 6// Common set of Object Storage and Archive Storage APIs for managing buckets, objects, and related resources. 7// 8 9package objectstorage 10 11import ( 12 "github.com/oracle/oci-go-sdk/common" 13) 14 15// ObjectNameFilter A filter that compares object names to a set of prefixes or patterns to determine if a rule applies to a 16// given object. The filter can contain include glob patterns, exclude glob patterns and inclusion prefixes. 17// The inclusion prefixes property is kept for backward compatibility. It is recommended to use inclusion patterns 18// instead of prefixes. Exclusions take precedence over inclusions. 19type ObjectNameFilter struct { 20 21 // An array of glob patterns to match the object names to include. An empty array includes all objects in the 22 // bucket. Exclusion patterns take precedence over inclusion patterns. 23 // A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other 24 // than the special pattern characters described below, matches itself. 25 // Glob patterns must be between 1 and 1024 characters. 26 // The special pattern characters have the following meanings: 27 // \ Escapes the following character 28 // * Matches any string of characters. 29 // ? Matches any single character . 30 // [...] Matches a group of characters. A group of characters can be: 31 // A set of characters, for example: [Zafg9@]. This matches any character in the brackets. 32 // A range of characters, for example: [a-z]. This matches any character in the range. 33 // [a-f] is equivalent to [abcdef]. 34 // For character ranges only the CHARACTER-CHARACTER pattern is supported. 35 // [ab-yz] is not valid 36 // [a-mn-z] is not valid 37 // Character ranges can not start with ^ or : 38 // To include a '-' in the range, make it the first or last character. 39 InclusionPatterns []string `mandatory:"false" json:"inclusionPatterns"` 40 41 // An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion 42 // patterns take precedence over inclusion patterns. 43 // A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other 44 // than the special pattern characters described below, matches itself. 45 // Glob patterns must be between 1 and 1024 characters. 46 // The special pattern characters have the following meanings: 47 // \ Escapes the following character 48 // * Matches any string of characters. 49 // ? Matches any single character . 50 // [...] Matches a group of characters. A group of characters can be: 51 // A set of characters, for example: [Zafg9@]. This matches any character in the brackets. 52 // A range of characters, for example: [a-z]. This matches any character in the range. 53 // [a-f] is equivalent to [abcdef]. 54 // For character ranges only the CHARACTER-CHARACTER pattern is supported. 55 // [ab-yz] is not valid 56 // [a-mn-z] is not valid 57 // Character ranges can not start with ^ or : 58 // To include a '-' in the range, make it the first or last character. 59 ExclusionPatterns []string `mandatory:"false" json:"exclusionPatterns"` 60 61 // An array of object name prefixes that the rule will apply to. An empty array means to include all objects. 62 InclusionPrefixes []string `mandatory:"false" json:"inclusionPrefixes"` 63} 64 65func (m ObjectNameFilter) String() string { 66 return common.PointerString(m) 67} 68